Query records where artist name begins with a number

  • Thread starter Thread starter Jeremy
  • Start date Start date
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
 
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".
 
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.
 
Back
Top