By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,574 Members | 1,977 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,574 IT Pros & Developers. It's quick & easy.

Select records using like statement

P: 106
Hi all

I am using the following query to select records for table

Select JobTitle,JobDesc,Scraped,logoimage,JobPostID,Schoo lID,web,MemType,InstitutionName,PayScale,LEA,Contr act as ContractType,HoursAbl,StartDate,ClosingDate,asap from tblJobScrap Where ((JobTitle like '% Art %' OR JobTitle like '% Art and Design %' OR JobTitle like '% Art & Design %'))

This query return the records having no keywords like Art ,Art and Design or Art & Design but having words having Start (for St(Art) ,P(art) etc) where I want to retrieve only those records that have Art word.
I don't know how i can do this
Any Help in this issue
Nov 20 '08 #1
Share this Question
Share on Google+
2 Replies

P: 6
Seems to me you don't have spaces around the word Art in your actual query. So use '% Art %' instead of '%Art%'.

I would do it like this:

WHERE JobTitle like '% Art %' OR JobTitle like 'Art %' OR JobTitle like '% Art'
Nov 21 '08 #2

P: 106
Thanks for giving a useful Hint. Really work for me
Nov 24 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.