sampathsoft
SSC Eights!
Points: 855
More actions
April 21, 2008 at 12:13 am
#189575
I want to apply like Operator in my searching time. but i dont use it before with variable. anyone pls help me to slove this.
Ex SELECT *
FROM Product
WHERE (CategoryID = @CategoryId) AND (Keywords Like @Category)
steveb.
SSC-Forever
Points: 46733
April 21, 2008 at 4:17 am
#804832
try this;
Declare @Keywords varchar(50)
set @Keywords = 'YourString'
SELECT *
WHERE (CategoryID = @CategoryId) AND
(Keywords Like '%' + @Keywords + '%' )
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply