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
Just use it like this will work
Create procedure sp_DoctorList @userid varchar(100) as begin exec ('select * from doctor where userid in ( '+ @userid +' )') end