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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -