Like condition

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
 
J

Jonathan Blitz

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."
 
W

Warrio

Cool it works perfectly, however is there an equivalent in an Access query

Thanks again!
 
J

John Spencer (MVP)

Yes, try the question mark.

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

Warrio

This is it
Thank you!

John Spencer (MVP) said:
Yes, try the question mark.

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