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 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy