Stored Proc Error help.
-
create a stored porc and i want to send numeric value with parameter how can i do this create porc test @num int as select * from table1 where id in (@num) i am not use where caluse because i want to send like 1,2,3,4 at the single query Pls help vipin paliwal vipin paliwal
-
create a stored porc and i want to send numeric value with parameter how can i do this create porc test @num int as select * from table1 where id in (@num) i am not use where caluse because i want to send like 1,2,3,4 at the single query Pls help vipin paliwal vipin paliwal
CREATE PROCEDURE ProcName ( @WhereClause varchar(100) ) AS -- Create a variable @SQLStatement DECLARE @SQLStatement varchar(255) -- Enter the dynamic SQL statement into the -- variable @SQLStatement SELECT @SQLStatement = 'select * from table1 where id in ' + @WhereClause SET NOCOUNT ON -- Execute the SQL statement EXEC(@SQLStatement) SET NOCOUNT OFF END Navi