I am pulling data from the database (DB1) in the following format:
DepartmentID DepartmentDesc
AABB Sales
AAAB Marketing
ABAB Customer Service ext.
Another database (DB2) has a table that also has DepartmentID and DepartmentDesc columns, but not all records are the same: departments can be shown in DB1 and not shown in DB2 and vise versa. I want to pull DepartmentDescs from DB1 and update the DB2 with them without touching the departments that exist in DB2 only.
My idea was to put DepartmentID and DepartmentDesc from DB1 into the variables that then will be sent to the stored procedure in DB2. The procedure will update the table for each sent row, or insert a new record in case if DepartmentID does not exist in DB2.
Is it doable?
Another idea was to load all DepartmentID and DepartmentDesc from DB1 to the temporary table in DB2, then run an update and delete the table, but I cannot see the temporary table in OLEDB Destination. Should I use any other control?
Thank you.
DepartmentID DepartmentDesc
AABB Sales
AAAB Marketing
ABAB Customer Service ext.
Another database (DB2) has a table that also has DepartmentID and DepartmentDesc columns, but not all records are the same: departments can be shown in DB1 and not shown in DB2 and vise versa. I want to pull DepartmentDescs from DB1 and update the DB2 with them without touching the departments that exist in DB2 only.
My idea was to put DepartmentID and DepartmentDesc from DB1 into the variables that then will be sent to the stored procedure in DB2. The procedure will update the table for each sent row, or insert a new record in case if DepartmentID does not exist in DB2.
Is it doable?
Another idea was to load all DepartmentID and DepartmentDesc from DB1 to the temporary table in DB2, then run an update and delete the table, but I cannot see the temporary table in OLEDB Destination. Should I use any other control?
Thank you.