Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Passing column name as parameter to function

Author  Topic 

aniketh
Starting Member

2 Posts

Posted - 2011-09-12 : 07:23:21
Dear All,

It would be queit helpful if somebody has done the below scenario.

Passing actual column name to function dynamically not the column value.
Please provide a sample example if you have achieved this.



Aniketh

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-12 : 07:25:59
why should you do this? why cant your column name be determined before hand?
you need to use dynamic sql for implementing such a scenario but its not recommended

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -