Rearrange the records based on all matched numbers
Posted: Wed Nov 26, 2008 1:01 am
Hi,
I have recrds some thing like below
AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,USD,081124,1752.96,FTI
38365029,SGD,081124,700,FTI
38365029,GBP,081124,381.88,FTI
706155078,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,DDE
38365029,SGD,081124,700,DDE
706155078,EUR,081124,1752.96,DDE
And i want to arrange them in the way that all the records in order having same account numbers.
Example like below(Required output)
AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
38365029,SGD,081124,700,FTI
38365029,SGD,081124,700,DDE
38365029,GBP,081124,381.88,FTI
706155078,EUR,081124,1752.96,FTI
706155078,EUR,081124,1752.96,DDE
I tried with extracting group of records if the ( accno for PROD(FTI) = accno for PROD(DDE))
=F_ShuffleRec(EXTRACT(Record_FTI Group:Output,AcctNum:Record_FTI Group:Output=
AcctNum:Record_DDE Group:Output ),EXTRACT(Record_DDE Group:Output,AcctNum:Record_DDE Group:Output=AcctNum:Record_FTI Group:Output ))
I am getting some repeated records like below:
AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,EUR,081124,1752.96,FTI
706155031,USD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,USD,081124,1752.96,DDE
38365029,SGD,081124,700,FTI
38365029,SGD,081124,700,DDE
38365029,GBP,081124,381.88,FTI
38365029,SGD,081124,700,DDE
706155078,EUR,081124,1752.96,FTI
706155078,EUR,081124,1752.96,DDE
Can any one help on this,
Thanks,
Usha.
I have recrds some thing like below
AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,USD,081124,1752.96,FTI
38365029,SGD,081124,700,FTI
38365029,GBP,081124,381.88,FTI
706155078,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,DDE
38365029,SGD,081124,700,DDE
706155078,EUR,081124,1752.96,DDE
And i want to arrange them in the way that all the records in order having same account numbers.
Example like below(Required output)
AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
38365029,SGD,081124,700,FTI
38365029,SGD,081124,700,DDE
38365029,GBP,081124,381.88,FTI
706155078,EUR,081124,1752.96,FTI
706155078,EUR,081124,1752.96,DDE
I tried with extracting group of records if the ( accno for PROD(FTI) = accno for PROD(DDE))
=F_ShuffleRec(EXTRACT(Record_FTI Group:Output,AcctNum:Record_FTI Group:Output=
AcctNum:Record_DDE Group:Output ),EXTRACT(Record_DDE Group:Output,AcctNum:Record_DDE Group:Output=AcctNum:Record_FTI Group:Output ))
I am getting some repeated records like below:
AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,EUR,081124,1752.96,FTI
706155031,USD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,USD,081124,1752.96,DDE
38365029,SGD,081124,700,FTI
38365029,SGD,081124,700,DDE
38365029,GBP,081124,381.88,FTI
38365029,SGD,081124,700,DDE
706155078,EUR,081124,1752.96,FTI
706155078,EUR,081124,1752.96,DDE
Can any one help on this,
Thanks,
Usha.