Pulling from a database starting with one letter?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
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.
 
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 said:
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 said:
Hi,
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top