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
 General SQL Server Forums
 New to SQL Server Programming
 how to execute this?

Author  Topic 

mavericky
Posting Yak Master

117 Posts

Posted - 2012-02-17 : 18:46:49
Hi,
One of my table contains these values in its column:


create table #temp11
(
message varchar(max)
)

How can I get these values executed. They are shown when I select from a table. But how to get them executed on the database?

message column has these values:

EXEC ALTER TABLE dbo.Substation DROP CONSTRAINT FK_Substation_UDCID
EXEC ALTER TABLE dbo.AggregatorServiceDeliveryPoint DROP CONSTRAINT FK_AggregatorServiceDeliveryPoint_Aggregator
EXEC ALTER TABLE dbo.AggregatorServiceDeliveryPoint DROP CONSTRAINT FK_AggregatorServiceDeliveryPoint_ServiceDeliveryPoint
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_ServiceTypeID
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_ESPID
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_AggregatorID
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_UDCID
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_AssetClassID
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_ProgramNotificationTimeFrameID
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_RateID
EXEC ALTER TABLE dbo.Tariff DROP CONSTRAINT FK_Tariff_ServiceCategoryID
EXEC ALTER TABLE dbo.Agreement DROP CONSTRAINT FK_Agreement_CustomerID
EXEC ALTER TABLE dbo.Agreement DROP CONSTRAINT FK_Agreement_EntityToID_CustomerID
EXEC ALTER TABLE dbo.Agreement DROP CONSTRAINT FK_Agreement_AgreementType
EXEC ALTER TABLE dbo.Agreement DROP CONSTRAINT FK_Agreement_ProgramID
EXEC ALTER TABLE dbo.Injection DROP CONSTRAINT FK_Injection_CaseID
EXEC ALTER TABLE dbo.Injection DROP CONSTRAINT FK_Injection_TraceID
EXEC ALTER TABLE dbo.Injection DROP CONSTRAINT FK_Injection_TraceIDNodeID
EXEC ALTER TABLE dbo.AgreementAsset DROP CONSTRAINT FK_AgreementAsset_AgreementID_Agreement_ID


can anyone help me?

Thanks,
Mavericky

X002548
Not Just a Number

15586 Posts

Posted - 2012-02-17 : 19:23:01
get rid o EXEC???


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -