swf Posted January 30, 2006 Posted January 30, 2006 I have been searching the forum for some time. I thought there might be a script that automates the process of manually importing each table and resetting the serial number when copying into a clone. It is time consuming to do this for each table. Thanks
Robert Kidd Posted February 1, 2006 Posted February 1, 2006 Assuming the database is called "Db". Create scripts to go to each of your tables and show all records ( one script per table ).Create a copy of the database and rename one of them to say DbOLD. Using the Db copy create a script which calls each of the scripts in the dbOLD copy in turn and imports into the relavent table ( NB make sure the option ot autoenter values is not checked ) You can reset the serial numbers in each table with a script step Set Next Serial Value[Db::Pkey; Ceiling ( Db::Pkey ) + 1] Next time you create a clone rename the original as DbOld and run your import script in the clone. It's easier than it sounds, honest.
Recommended Posts
This topic is 6872 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now