I have two source tables:
- Ext_Agreements
- ABS_Agreements
both have the same columns : "each table have different data this is just an example"
ID, START_DATE, END_DATE,
01, 28/02/2021, 04/05/2021
02, 11/10/2021, 09/01/2022
03, 08/01/2022, 03/05/2022
I want to merge them in one table in the destination Database, while maintaining the information of the type of the agreement by adding a columns "AGREEMENT_TYPE" that contain "Ext" or "ABS" based of the source table of the Agreement.
the destination table will have :
ID, START_DATE, END_DATE, AGREEMENT_TYPE
01, 28/02/2021, 04/05/2021, ABS
02, 11/10/2021, 09/01/2022, EXT
03, 08/01/2022, 03/05/2022, ABS
I tried merge and Union All and derived columns, but I didn't succeed. thank you
If you want to use SSIS, then...
In data flow.
Create a source based on:
Add a derived column and add:
Do the same this for ABS (source and der col).
Then put them together in a UnionAll.