sql server - which kind of record this like will get? -
like ',%,%,'
i using above in case statement record. it's not working expected.
my query -
select case when row_id ',%,%,' 'a' when row_id not ',%,%,' '' end 'af' myview row_id = '2464,2465,2466' order 1 desc
expected output - getting blank.
this like:
row_id ',%,%,'
will match every single row_id starts , ends comma , has @ least comma in between.
your query, because of clause
where row_id = '2464,2465,2466'
will return empty set because row_id doesn't match previous pattern.
Comments
Post a Comment