Insert,delete,update based on Indicator
Posted: Wed Apr 13, 2011 3:13 pm
Hi
I have a question, let me take an example
I have five columns, first two columns are key columns and last column is an indicator in which 'I' stands for Insert, 'C' stands for Update and 'D stands for Delete. For first run, I will have all I's which will be all inserts
Col1 Col2 Col3 Col4 Col5
A 1 abc ab I
A 2 abc aa I
B 1 aa bb I
B 2 bb aa I
C 1 aa aa I
C 4 bb bb I
For second run
Col1 Col2 Col3 Col4 Col5
A 1 aa ab C
A 2 bb aa C
B 1 aa bb I
B 2 bb aa D
C 6 aa bb I
How can I do it in datastage, my target is DB2, and source comes as files
Thanks in advance
I have a question, let me take an example
I have five columns, first two columns are key columns and last column is an indicator in which 'I' stands for Insert, 'C' stands for Update and 'D stands for Delete. For first run, I will have all I's which will be all inserts
Col1 Col2 Col3 Col4 Col5
A 1 abc ab I
A 2 abc aa I
B 1 aa bb I
B 2 bb aa I
C 1 aa aa I
C 4 bb bb I
For second run
Col1 Col2 Col3 Col4 Col5
A 1 aa ab C
A 2 bb aa C
B 1 aa bb I
B 2 bb aa D
C 6 aa bb I
How can I do it in datastage, my target is DB2, and source comes as files
Thanks in advance