SCD type 2 in server jobs in DS 7.1....Need help
Posted: Sun Jul 19, 2009 2:10 pm
Hi,
I need help to implement like SCD type 2 in Server jobs DS 7.1,
n i have two columns in source.... pol no. and seq no., but "seq no." is not populating properly current in source...so need to correct it...
Source data example,
First run,
pol no. | seq no. |
171 | 1 |
171 | 4 |
171 | 5 |
172 | 1 |
172 | 3 |
Target data should be like below example,
After First run,
pol no. | seq no. |
171 | 1 |
171 | 2 |
171 | 3 |
172 | 1 |
172 | 2 |
Source data example,
2nd run,
pol no. | seq no. |
171 | 1 |
171 | 4 |
173 | 3 |
172 | 2 |
174 | 3 | ....n so on
Final Target data should be like below example,
pol no. | seq no. |
171 | 1 |
171 | 2 | ....earlier 1st run target data
171 | 3 |
172 | 1 |
172 | 2 |
171 | 4 |
171 | 5 |
173 | 1 | .....+ 2nd run target data
172 | 3 |
174 | 1 | ....n so on.....
As in need to correct seq no. of current data and going further it should also generate new seq no. (if pol no. exist in table then max(seq) + 1 and if it doesnot exist in table then should start from 1...for all src records to target table)
Please let me know best method to do this.....
I need help to implement like SCD type 2 in Server jobs DS 7.1,
n i have two columns in source.... pol no. and seq no., but "seq no." is not populating properly current in source...so need to correct it...
Source data example,
First run,
pol no. | seq no. |
171 | 1 |
171 | 4 |
171 | 5 |
172 | 1 |
172 | 3 |
Target data should be like below example,
After First run,
pol no. | seq no. |
171 | 1 |
171 | 2 |
171 | 3 |
172 | 1 |
172 | 2 |
Source data example,
2nd run,
pol no. | seq no. |
171 | 1 |
171 | 4 |
173 | 3 |
172 | 2 |
174 | 3 | ....n so on
Final Target data should be like below example,
pol no. | seq no. |
171 | 1 |
171 | 2 | ....earlier 1st run target data
171 | 3 |
172 | 1 |
172 | 2 |
171 | 4 |
171 | 5 |
173 | 1 | .....+ 2nd run target data
172 | 3 |
174 | 1 | ....n so on.....
As in need to correct seq no. of current data and going further it should also generate new seq no. (if pol no. exist in table then max(seq) + 1 and if it doesnot exist in table then should start from 1...for all src records to target table)
Please let me know best method to do this.....