I need to build a bunch of dynamic like statements '% ' or '% %'.
heres an example of one that im working on just to test..
declare @check varchar(50)
set @check = 'Bad'
declare @select varchar(50)
set @select = 'select * from art where style like %' + @check + ' and
inventoryid =13'
exec (@select)
how can I make this work for either like statements?
thanks
-Jim
heres an example of one that im working on just to test..
declare @check varchar(50)
set @check = 'Bad'
declare @select varchar(50)
set @select = 'select * from art where style like %' + @check + ' and
inventoryid =13'
exec (@select)
how can I make this work for either like statements?
thanks
-Jim
Comment