I want to write a SQL Server 2005 stored procedure which will select and return the user records from the user table for some userids which are passed to the stored procedur
You can also use Find_IN_SET instead of IN. See the query below
create procedure myproc(IN in_user_ids varchar(100)) begin select * from users where FIND_IN_SET(userid, in_user_ids); end