select count(*) from messages where numero like '%5585090333%'
or select * from messages where numero like '%5585090333%'
where 5585090333 is one value of field min_user of table voice it returns all values for such condition. But when I run the same query using where numero like '%(select min_user from voice)%' it gives nothing, the same if I use IN instead LIKE
surely the concatenated values in t1.numero are delimited in some logical way, such as fixed width? If not, you might as well throw up your hands in defeat right now, 'cause your problems with this are going to last the life of the application.
If they are concatenated with some sort of consistent logic, then you should develop an algorythym for parsing out the elements. Put it in a function if you can.
Originally posted by jeremas
where numero like '%(select number_min from voice)%'
Man .. when you say '%(select number_min from voice)%' SQL server is not going to run the select query coz it assumes it is a string you are searching for which has '(select number_min from voice)' string in between. Hence your 0 rows.