sql - how to use replace function with in clause in mysql -
i want sql query gives output concat string
sql query
select group_concat(nm) xyz xyz.id in (replace(abc,"|",','))  where abc string 1|2|3|4 ids of xyz table above query gives nm of 1st id in abc.i thing creates query like
select group_concat(nm) xyz xyz.id in ("1,2,3,4")  so (") may creates problem can help.
you can use like, (but not going use indexs)
select group_concat(nm) xyz concat('|', abc, '|') concat('%|', xyz.id, '|%');  
Comments
Post a Comment