
28-Jul-2006, 08:25 AM
|  | Guest | | | | | | | | | | Re: Pulling from a database starting with one letter? Add a WHERE clause?
WHERE LEFT(strCategory,1)="A"
Pete
"UKSBD" píše v diskusním příspěvku
news:A2B95EC7-7E4C-4A48-BBEA-E5799DF8EFA1@microsoft.com...
> Hi,
> I'm trying to sort a directory alphabetically using ASP Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12003
> How can I pull from the database but just pull out
> categories starting with one letter? Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12003
> At the moment I am just using
>
> ORDER BY strCategory ASC
>
> Which pulls them all and lists alphabetically,
> but how do I just pull all categories starting with A?
> and then a separate one pulling categories starting
> with B, etc. etc.
>
> Many thanks.
>
> | 
28-Jul-2006, 08:25 AM
| ![Arvin Meyer [MVP]'s Avatar](http://www.sikhphilosophy.net/images/avatars/noavatar.gif) | Guest | | | | | | | | | | Re: Pulling from a database starting with one letter? Use a where clause with the "like" keyword:
WHERE [Field Name] Like "A*"
using asp and html, you'll need to use a % sign in place of the asterisk.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads http://www.datastrat.com http://www.mvps.org/access
"UKSBD" wrote in message
news:A2B95EC7-7E4C-4A48-BBEA-E5799DF8EFA1@microsoft.com...
> Hi,
> I'm trying to sort a directory alphabetically using ASP
> How can I pull from the database but just pull out Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12003
> categories starting with one letter?
> At the moment I am just using
>
> ORDER BY strCategory ASC
>
> Which pulls them all and lists alphabetically,
> but how do I just pull all categories starting with A?
> and then a separate one pulling categories starting Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12003
> with B, etc. etc.
>
> Many thanks.
>
> | 
28-Jul-2006, 08:25 AM
|  | Guest | | | | | | | | | | Re: Pulling from a database starting with one letter? Thank you, that was exactly what I wanted.
I also see I can also pull out individual categories in the same way.
Going to be very useful for me.
Thanks again.
"Arvin Meyer [MVP]" wrote:
> Use a where clause with the "like" keyword:
>
> WHERE [Field Name] Like "A*"
>
> using asp and html, you'll need to use a % sign in place of the asterisk.
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads
> http://www.datastrat.com
> http://www.mvps.org/access Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12003
>
> "UKSBD" wrote in message
> news:A2B95EC7-7E4C-4A48-BBEA-E5799DF8EFA1@microsoft.com...
> > Hi, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12003
> > I'm trying to sort a directory alphabetically using ASP
> > How can I pull from the database but just pull out
> > categories starting with one letter?
> > At the moment I am just using
> >
> > ORDER BY strCategory ASC
> >
> > Which pulls them all and lists alphabetically,
> > but how do I just pull all categories starting with A?
> > and then a separate one pulling categories starting
> > with B, etc. etc.
> >
> > Many thanks.
> >
> >
>
>
> | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Active Discussions | | | | | | | ਨਾਮਾ Today 06:37 AM 2 Replies, 51 Views | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |