Query records where artist name begins with a number

J

Jeremy

I need to query an music database by artist where the
artist name begins with a number, like 3 Doors Down for
example. I have set up queries to search the db by letter,
but I cannot figure out how to set up the query to get all
records that do not begin with a letter. I have the letter
queries set up like so

In the Artist field, I have the criteria as Like "A*". How
can I get it to where it checks to see if the first letter
is a number, sort of like Like "1*" OR "2*"...etc...

Thanks
 
J

John Vinson

In the Artist field, I have the criteria as Like "A*". How
can I get it to where it checks to see if the first letter
is a number, sort of like Like "1*" OR "2*"...etc...

LIKE "#*"

will do it; the # character is a wildcard meaning "match any numeric
digit".
 
D

Danny J. Lesandrini

How about this ... if I correctly understood your request:

SELECT * FROM tblMusic WHERE IsNumeric(Left([ArtistName], 1)) = True

Now, this only looks at the first character, so it will get 3 Doors down,
and 333 Doors down as well.
 

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

Top