Advertisement
Advertisement
| 06.18.2008 at 11:50AM PDT, ID: 23496399 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: |
exec sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
DELETE FROM [dbo].[table1]
DELETE FROM [dbo].[table2]
exec sp_msforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
-- data import script
-- lookups
insert into table1 (
column1,
column2
)
select column1,
column2
from sqlservername.databasename.dbo.table_name1
insert into table2 (
table2_column1,
table2_column2
)
select column1,
column2
from sqlservername.databasename.dbo.table_name2
|