Multiple LIKE clauses

steveharrisholt

New member
Joined
Dec 3, 2008
Messages
1
Programming Experience
3-5
Hi,

I am trying to return results from an ACCESS database using ASP where all of the search terms are in one of the fields. The query I am using is:

SELECT photos.photoid, photos.landscape FROM photos INNER JOIN tblKeywords ON photos.photoid = tblKeywords.photoid WHERE gwlad = true AND UCase(Keyword) LIKE UCase('%summer%') AND UCase(Keyword) LIKE UCase('%waterfall%') ORDER by photos.landscape, photos.photoid

When I try this through ACCESS directly (changing the like wildcards to *) it works fine and return 1 result that has both SUMMER and WATERFALL in the keywords field.

When I run the same query (using % for wildcards) through the ASP page it returns no results.

If anyone can help it would be much appreciated.

Thanks,

Steve
 
Top Bottom