i want to pass a select query in a stored procedure as an argumnet
I made this procedure..
ALTER PROCEDURE [dbo].[MyProcedure]
@pSelect nvarchar
AS
BEGIN
SET NOCOUNT ON;
select @pSelect from tabel1
END
I want to pass a select query like from c# code to this stored procedure
MyProcedure("column1,column2");
How could I do this because stored procedure treat my parameter as a
string and it behaves like
select N'column1,column2' from tabel1
pls help me
or provide a better option for this
No comments:
Post a Comment