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

simple SQL question

Status
Not open for further replies.

gtbikerider

Technical User
Joined
May 22, 2001
Messages
81
Location
GB
Hi

I want to get a recordset that in English would look like...

select *
from calendar
where title contains 'open day'

...But "contains" is not correct syntax. How can this be done in SQL? or must I extract all and then use a

<cfif #title# contains &quot;open day&quot;>

--
John
 
you can use the like function in SQL and then use some wild cards, so that the query will return records with 'open day' anywhere in the field

so you query will look like:

select *
from calendar
where title LIKE '%open day%'

hope this helps !
 
Worked a treat. Thanks for the fast response. --
John
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top