Sunday, September 9, 2007

checking for % when it is part of data

select c1
from
(
    select 'universal%person' as c1 union all select 'universal'
 ) as t
 where c1 like '%\%%' escape '\'

select c1
from
 (
select 'universal%person' as c1 union all select 'universal'
) as t
where c1 like '%[%]%' escape '\'

No comments: