Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
joax11
Starting Member
4 Posts |
Posted - 2008-07-08 : 10:51:37
|
| Hello, I am new in here and not sure if this is the topic in which i have to post this issueI have a database where I have a table with certain columns, and another database with the same table but without some of the columns and they have the same data.The thing is that I have to add the left-out columns to the table in the second database and put the data in it.So I thought I could export the data from the first database to excel and then put it in the second database. But I am not sure how to import in the registers only the columns that were left-out and not duplicating the data.Any help?Thanks in advance |
|
|
mdubey
Posting Yak Master
133 Posts |
Posted - 2008-07-08 : 11:17:12
|
| Why can not you use the DTS/SSIS package. No need to use outer join and export to excel and again export to other DB. Simply you need to create a task in SQL DTS(2000)/SSIS(2005/2008) and select the table from the source and on the target at the time of mapping you can add more columns(which you have on Target Server).ManojMCP, MCTS |
 |
|
|
joax11
Starting Member
4 Posts |
Posted - 2008-07-08 : 11:45:26
|
quote: Originally posted by mdubey Why can not you use the DTS/SSIS package. No need to use outer join and export to excel and again export to other DB. Simply you need to create a task in SQL DTS(2000)/SSIS(2005/2008) and select the table from the source and on the target at the time of mapping you can add more columns(which you have on Target Server).ManojMCP, MCTS
Hey ManojThanks for the reply, could you please give me more details on how to do that? I am kind of new with SQL. You can email me at joax_peralta@hotmail.comThanks |
 |
|
|
joax11
Starting Member
4 Posts |
Posted - 2008-07-08 : 11:57:49
|
| BTW, I am using SQL 2005And the second database table has more registers than the one in the first so i cant copy the complete table on top of the one in the second database |
 |
|
|
maninder
Posting Yak Master
100 Posts |
Posted - 2008-07-08 : 15:16:44
|
| USE SSIS(SQL Server Integration Services) and use COpy Object Task (many properties you can change)ManinderSQL server Architect / Admin (DEV&PROD) |
 |
|
|
joax11
Starting Member
4 Posts |
Posted - 2008-07-08 : 15:28:09
|
| hey there, thanks for the advicesi found an easier way i thinki used a cursos and iterated over the first table and updated the second where the keys where the samethanks |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-07-09 : 23:01:10
|
| But does it perform better? |
 |
|
|
|
|
|