sql like - MySQL CONCAT in WHERE Statement (Multi Tables) -
my problem pretty simple - @ least hope is. try join 2 tables in mysql , perform statement on concatenated field produce result. here sample query:
select a.name, b.company, concat_ws(' ', a.company, b.name) whole_name users inner join company b on a.company_id = b.company_id having whole_name '%ibm john%' limit 25 this query seems still pulling name column , return no results. i've tried doing:
select a.name, b.company, concat_ws(' ', a.company, b.name) whole_name users inner join company b on a.company_id = b.company_id concat_ws(' ', a.company, b.name) '%ibm john%' limit 25 and still doesn't yield results. data absolutely in table. company john ibm computer systems. whole_name field return 'ibm computer systems john smith' query on '%ibm john%' return nothing.
any help?
thanks, greg
need % between ibm , john... it's looking "ibm john" somewhere in text... not ibm john somewhere further along..
Comments
Post a Comment