Hi there,<BR><BR>I wnat to implement a stored procedure that uses the IN statement to select all records that return an ID that matches the ID supplied in the IN statement. ie;<BR><BR>SELECT DISTINCT category_id, suburb_id, category_name FROM vw_SELECT_CATEGORIES_AVAILABLE WHERE state_id = 1 <BR>AND suburb_id IN (2,3) order by category_id<BR><BR>Now I have made this into a stored proc which I call from an ASP page like this:<BR><BR>conn.execute("sproc_SELECT_CATEGORIES " & stateid & ", " & suburbid)<BR><BR>The thing is suburbid has multiple comma deliminated values such as 1, 2, 3, 4 and so on. If I put brackets around the suburbid [] it works butonly retreives the first value (I also declare the variable in the Stored Proc as nvarchar as it wont take an int value - I guess this is half my problem...)<BR><BR>So at the moment Im just calling it from my asp page as the whole select statement that you see in the second paragraph....but Id much rather a stored proc!!<BR><BR>Any feedback would be greatly appreciated<BR><BR>Regards,<BR><BR>MAtt CAhill