ALTER PROCEDURE [dbo].[MyProcedure] @pSelect nvarchar AS BEGIN SET NOCOUNT ON; select @pSelect from tabel1 END
MyProcedure("column1,column2");
select N'column1,column2' from tabel1
ALTER PROCEDURE [dbo].[MyProcedure] @pSelect nvarchar AS BEGIN SET NOCOUNT ON; Exec('Select ' + @pSelect + ' from tabel1;'); END
EXEC ('SELECT ' + @pSelect + ' FROM Table1')
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)