>>I can't test this right now (I install some SP here) >>but what if you change declarations of the variables from CHAR() to VARCHAR()? > >Changing to varchar will find the records. > >But, why?
declare @x char(20)
set @x = 'test%'select @x + '<'declare @y varchar(20)
set @y = 'test%'select @y + '<'
there's a big difference between those two as far as the LIKE operation is concerned