I have a stored procedure that returns a list of userIds that are available to the logged in user. I need to be able to use this list of userIds in another stored procedure whose purpose is to simply query a table for all results containing any of those userIds.
So if my first Stored Procedure returns this:
I need my select statement to do something like this:
select UserId, Column1, Column2
where UserId = 2 or UserId = 3 or UserId = 5 or UserId = 6
I'm very new to stored procedures, can anyone help me with the syntax for doing this. I'm being pressured to get this done very quickly.