DECODE or else, a little test...
From: L. Tseng <lesliet_at_u.washington.edu>
Date: 1996/11/13
Message-ID: <56bc0h$hfl_at_nntp1.u.washington.edu>#1/1
Date: 1996/11/13
Message-ID: <56bc0h$hfl_at_nntp1.u.washington.edu>#1/1
DECODE() is probably the most powerful function in Oracle.
 
For example
   
 
can be converted as
 
     DECODE(colA, 1, DECODE(colB, 1, 'YES', 'NO'), 'NO')
 
BUT.....
Can DECODE do the following?
     IF colA = 1 AND colB = 1 THEN 'YES'
     ELSE 'NO'
     IF      colA > 100 THEN 'A'
     ELSIF   colA = 100 THEN 'B'
     ELSE    'C'
Thanks,
Leslie Received on Wed Nov 13 1996 - 00:00:00 CET
