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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How do I merge SQL2000 data with SQL2005 data

Author  Topic 

Mangelo
Starting Member

2 Posts

Posted - 2010-11-03 : 11:02:20
How can merge fields from a SQL2000 Table to fields from a SQL2005 using DTS processing or some other automatic programmatic processing?

For example,

SQL2000 Table - Customer
SQL2000 Table fields - Customer_ID, Customer_Name

SQL2005 Table - PaymentTbl
SQL2005 Table fields - Customer_ID, Payment_Amt

Result Data

SQL2005 Environment
Customer_ID, Customer_Name, Payment_Amt

or

SQL2000 Environment
Customer_ID, Customer_Name, Payment_Amt

EDIT by tkizer: moved topic out of Script Library forum, since this isn't a working script.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-11-06 : 10:36:42
Easiest is probablt to import the 2000 data to a staging table on the 2005 server then do the merge there.
You could probably do the copy via a linked server.

Otherwise you could use ssis to read from both tables and do a merge and eaither update the 205 table or inser into a new one but I think that's a lot more complicated.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -