![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
i have an existing sql database with data and i'm trying to migrate the data to another empty sql database. our software's been updated and the new database's schema's been changed. i want our existing data inserted into the new database. i've tried to use dts but am having problems. first try worked but it copied the objects...meaning the old table structure and data. not good. i then chose to use a query as the source. the problem is it seems to want to make the destination a new table called 'results'. it's giving an error says 'column names in each table must be unique'. my source query selects data from several dozen tables. because of foreign keys, etc the same field id is used multiple times. but why is it making one destination table? how do i make sql server select data from one database and insert it into the exact same table.field in the new database? ...without altering the structure of the new database. i'm a complete newbie so i'm sure i'm doing something wrong. i've looked at the 'transformation' tab but all i see are fields. i don't see where you define the source and destination tables. the only option button available is 'create destination table', the 'append rows to destination table' is disabled. plus, why is it singular? i want data from multiple tables to be inserted into multiple tables. is this possible? hope that makes sense. thanks in advance. mark |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
thanks ryan, i'll look at the link you included. i saw the pulldown but my select query pulls from multiple tables. i'd like to insert the data into the same (multiple) tables in the new database. i can't just select 1 destination table. does this mean i have to split up the job into one query per table so i can choose the proper destination? i have dozens of tables to migrate. what a mess. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
thanks. i'll try it again. i tried that (copy objects) first but must have had some incorrect options selected. that's why i moved on to trying it from a query. to confirm, it IS(???) possible to copy ONLY the data from one database to another using this method? without altering the destination design? what if there are some fields in the old database that don't exist in the new one? over time we had modified the 'out of the box' design. we don't use most of it anymore. i'd like this update on the new database to get back to an 'out of the box' state. basically, i only want the data copied where both tables and fields match. i don't want dts to create/modify anything. just move the data where the tables and field names match. thanks again for your help. mark |
#7
| |||
| |||
|
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |