Hi,
Why does the below stored procedure not return any values??
Yet this same query which I use in the stored proc does return values...
Thanks.Code:SELECT SetID FROM TestSets WHERE (UserID IN ('user1','user2'))
Code:ALTER PROCEDURE [dbo].[TestStoredProc] -- Add the parameters for the stored procedure here @UserID nvarchar(max) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @SetID varchar(50) -- Insert statements for procedure here SET @SetID = ( SELECT SetID FROM TestSets WHERE (UserID IN (@UserID))) SELECT @SetID END GO








Bookmarks