May 26, 2009 at 1:39 am
I have a criteria that if user have give o'brain then
i have to fetch both records ie.. (obrain & o'brain)
what i am looking for is
SELECT surname,*FROM table WHERE surname LIKE 'O''brain%'
union ALL
SELECT surname,*FROM table WHERE surname LIKE 'obrain%'
but in a single query?
thanks in advance...
May 26, 2009 at 4:57 am
hi,
have you tried something like
SELECT surname, * FROM table WHERE surname LIKE '%brain'
regards
May 26, 2009 at 5:03 am
this will not serve my purpose...
thanks for your time...
May 26, 2009 at 5:10 am
Hi charles
What exactly are you trying to do with the SQL, if you want a query that starts with 0 and then ends with Brain with some middle characters then try something like Name like 'O%Brain'
Hope this helps 🙂
May 26, 2009 at 5:21 am
hi,
This will solve my problem ,Thanks...:-)
Regards,
Charles
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply