October 8, 2002 at 3:43 pm
We are going to be upgrading to a new database structure. There will be some new tables. The existing tables will only have new columns. No columns will be removed.
Is there a fast way to copy out all the data from every existing table and then import it back into a table with the same name. Again the fields will not match one for one.
Start with tblTest
Column1 Column2
New tblTest is
Column1 Column3 Column2
I am tring to avoid the brute force method of walking the tables and building INSERT INTO [tblTest]([Column1 ], [Column2]) VALUES ('dataColumn1 ','dataColumn2)
for every row.
Thanks for your help.
October 8, 2002 at 4:07 pm
You could of course use INSERT INTO newdb..tbl (col1, col2) SELECT col1, col2 FROM olddb..tbl
Or just use the Import/Export Tool, should be pretty handy in this case.
--
Chris Hedgate @ Apptus Technologies (http://www.apptus.se)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply