SQL WHERE field LIKE any number

I am using
- MSAccess
- Microsoft SQL Server  2000 - 8.00.760 (Intel X86)
- FrontPage 2003

I am trying to pull a report for a list of titles that being with a number 0-9. I have the following code working for an alphabet search:

      "WHERE BookTitle LIKE 'B%' and ACTIVE LIKE 'Yes' "

Do I have to do an OR statement for each number or is there a an inclusive code?

JLohmanAsked:
Who is Participating?
 
ericnilsConnect With a Mentor Commented:
Try this:

"WHERE BookTitle LIKE '[0-9]%' and ACTIVE LIKE 'Yes' "
0
 
Dale FyeConnect With a Mentor Commented:
Disagree with using like for an exact comparison.  Recommend:

WHERE [BookTitle] Like '[0-9]%' AND [Active] = 'Yes'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.