Like condition

  • Thread starter Thread starter Warrio
  • Start date Start date
W

Warrio

Hello!!

in SQL we can use the character % in an Sql statement (or * in an Access
query) to select all the fields that contain part of a string specified
for exp:
SELECT name FROM myTable WHERE name LIKE "Smi%"

Is it possible to ask the query to select only ONE charcter after the "Smi"?
so the result woult only the filds with 4 characters

Thanks for any suggestion
 
Use the underscore character instead of the %.


--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
Cool it works perfectly, however is there an equivalent in an Access query

Thanks again!
 
Yes, try the question mark.

The help file has this under Wildcard Characters (at least in Access 97 help)
 
Back
Top