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

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

c++ - Accessing inactive union member and undefined behavior? -

php - Get uncommon values from two or more arrays -