ACCT RECNO TYPE NAME
200 20 36 AA
100 11 36 BB
300 28 36 CC
Conditions/Constraints
Records with TYPE = 36 will go in the o/p but the RECNO will be of the just previous(ACCT should be same) record. Previous means when RECNO is sorted desc, then the just bigger RECNO.
Kindly suggest
Last edited by chandra.shekhar@tcs.com on Wed Dec 12, 2012 5:26 am, edited 3 times in total.
just to add that I have tried a logic in the transformer where I partition the data on ACCT and sort on RECNO desc.
Now I also used stage variables where I check the old ACCT with new ACCT.
I am getting the data as I require except the RECNO is not coming correctly.
I have mentioned above that the RECNO will always be from the just previous record and the previous record means the next big RECNO.
I dont understand what/where am I missing the logic?
@Chetan
As I told only record with TYPE = 36 will go in the o/p.
So for ACCT = 100, the RECNO will come from the just previous(larger) RECNO(in this case 10).
The NAME will always come from TYPE = 36(NOT TYPE = 1)
@Craig
In the transformer, partitioning is on ACCT with RECNO sorted desc.
stage variables are