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.
| Author |
Topic |
|
mavericky
Posting Yak Master
117 Posts |
Posted - 2012-02-16 : 15:24:45
|
| Hi,I want to execute the output of this script at run time:Select 'ALTER TABLE dbo.' + B.name + ' DROP CONSTRAINT ' + A.namefrom (select A.name, A.parent_object_id from sys.all_objects A where A.type='F') AINNER JOIN (select B.name, B.object_id from sys.all_objects B) BON A.parent_object_id = B.object_idIf directly copy, paste the above code and press 'Execute' in SQL Server 2008 it generates alter ..drop statements. But I want all those statements to be executed.Can anyone help me?Thanks,Amol |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-16 : 15:34:50
|
| why not copy paste the result onto a different query window and click execute------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|