Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Jumble Columns

SK KApr 20 2012 — edited Apr 20 2012
Database Version : 10.2

I have acct table that holds account number, CIF and account id. There is mapping between CIF and account number. Our concern is to shuffle account number and CIF. After shuffling, Account number and CIF should map correctly. We can map with respect to account id

Ex: Before Shuffling

Account id Account Number CIF
1 12345 1289
2 18909 1279
3 17898 1098
4 12009 1298


After Shuffling

Account id Account Number CIF
1 18909 1279
2 12345 1289
3 12009 1298
4 17898 1098

In the example after shuffling also mapping between Account number and CIF is still retained. It is shuffled with respect to Account ID.
I have explained it for 4 rows in above example. But in database there are millions of records.

Can you tell how to achieve this through SQL or PLSQL? Is there any shuffle function available?

Thanks in advance.

Regards,
SK
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2012
Added on Apr 20 2012
4 comments
232 views