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

Popular posts from this blog

python - Best design pattern for collection of objects -

go - serving up pdfs using golang -

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -