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
[Quoted] [Quoted] DECODE() is probably the most powerful function in Oracle.
For example
[Quoted] [Quoted] IF colA = 1 AND colB = 1 THEN 'YES' [Quoted] ELSE 'NO'
[Quoted] can be converted as
DECODE(colA, 1, DECODE(colB, 1, 'YES', 'NO'), 'NO')
[Quoted] [Quoted] BUT..... [Quoted] Can DECODE do the following?
[Quoted] IF colA > 100 THEN 'A' ELSIF colA = 100 THEN 'B' ELSE 'C'
Thanks,
Leslie Received on Wed Nov 13 1996 - 00:00:00 CET