I want to do this in a stored procedure...
SELECT * FROM qheader WHERE Category IN(@Categories)
where @Categories is a parameter passed from an aspx web page of the format 'Bikes','Cars','Mountains'.
But when I run the stored procedure no results are returned when I run it manually through Query Analyzer without using the @Categories variable it works fine.
I guess it has something to do with the quotations but I've tried lots of different combinations and formats and can't get it to work.