posted 18 years ago
I am making a utility to read a database and generate SQL INSERT statements for each row in every table. I want to be able to move data with a script from one DB to a DB at another job site. I am currently using MS SQL 2000.
Problem is...the schema has foreign key (FK) constraints. I get the meta data from the database and get a list of the tables. But it gives me the list in alphabetical order. It has no concept of FK constraints. So when I go to run the script, I get FK violations because some rows holding the FK have not yet been created.
Any suggestions?