I have an app that uses over 100 flat files that I import via DTS. My routine Drops all the tables in the DB and then imports them.
I recently have begun development on this DB and need to relate some tables. Once I create relationships I can no longer simply drop and import.
So I've been using:
exec sp_msforeachtable "DELETE FROM ?"
to clean out the data and leave the relationships alone. This works great.
However, what doesn't work is the import. How can I simply clean out the DB and run my import leaving the relationships intact?
Thanks for your help!
I recently have begun development on this DB and need to relate some tables. Once I create relationships I can no longer simply drop and import.
So I've been using:
exec sp_msforeachtable "DELETE FROM ?"
to clean out the data and leave the relationships alone. This works great.
However, what doesn't work is the import. How can I simply clean out the DB and run my import leaving the relationships intact?
Thanks for your help!