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 2005 Forums
 Transact-SQL (2005)
 how to pass parameters which is table or columname

Author  Topic 

imranabdulaziz
Yak Posting Veteran

83 Posts

Posted - 2007-07-23 : 23:12:38
dear all,

i am using sql server 2005.

my question is how to pass parameter in stored procedure which is table name or column name

please help

thnks

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-07-23 : 23:54:48
You would need to use dynamic SQL.

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-07-24 : 00:37:04
Why do you want to do that ?

read this http://www.sommarskog.se/dynamic_sql.html


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2007-07-24 : 06:34:02
Your question was answered when you first asked it here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=86725
Go to Top of Page
   

- Advertisement -