Wednesday, June 24, 2015

Oracle Nested Decode

Here is the decode in nested form

select decode(cus_no,null,
           decode(sup_no,null,
           decode(person_no,null,
            decode(acc_no,null,null,acc_no),person_no),sup_no),cus_no) destination

from my table
/


Learn Oracle with yasser

No comments:

Post a Comment