Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wildcard SQL query

Status
Not open for further replies.

simeybt

Programmer
Nov 3, 2003
147
GB
All,
A quick one I know I am stupid, but I have done access for a while do I search for a part of a string in field. Here is what I am trying to do but it is not working

Code:
SELECT *
FROM Employee
WHERE ((([Employee]![Grade])="*agency*"));



Simon



 
replace the "=" with " like " (without the quotes)
 
The following is the table for wildcards:

[tt]
Access SQL
Any number of characters * % (Percent)
One Character ? _ (Underscore)

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
One other thing, SQL tends to want to use the LIKE operator instead for pattern matching.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top