sql server - How to select Columns using parameters in report builder -
in report builder can select columns using parameters.
example : select @field, column2, column3 table_name
where @field
parameter.
also there way this:
select @field, column2, sum(column3) on (partition @field) table_name
this can done using dynamic sql:
create procedure columnreturn @columnname nvarchar(100) declare @sql nvarchar(max) set @sql = 'select [' + @columnname + '] [mytable]' exec (@sql) exec columnreturn 'mycolumn'
Comments
Post a Comment