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 2000 Forums
 SQL Server Development (2000)
 Query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-07 : 07:27:44
Tanvir Asad writes "Hi,

I have a Table column which contains Select Statement as Value of that column. I want to execute that Command which is a value in the column."

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-07 : 07:30:39
Use dynamic sql.

Declare @sql varchar(8000)

select @sql = col from tbl

exec(@sql)


Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
   

- Advertisement -