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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -