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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT WHERE LIKE '%%' statement not working

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
When I execute the statement

SELECT *
FROM Couriers
WHERE FeeEarner ='AWP';

I find one record. But when I try:

SELECT *
FROM Couriers
WHERE FeeEarner LIKE '%AWP%';

It doesn't find anything. Any ideas why?

Thanks
 
Excellent thanks - after doing a bit more research I found there is an option to change the ANSI compatiblity.

I've been using % as a wildcard in my ASP pages for years on this database without any problems. Not sure why % works in the script but the same query doesn't work when typed in...

cheers!
 
I guess you use ADODB in your ASP pages and ADO uses the ANSI wildcards.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top