Re: Nested DECODE?
From: Steve Jakob <sjakob_at_octrf.on.ca>
Date: 1997/02/21
Message-ID: <5el542$gkq_at_falcon.ccs.uwo.ca>#1/1
Date: 1997/02/21
Message-ID: <5el542$gkq_at_falcon.ccs.uwo.ca>#1/1
In article <330DC3BC.4ED8_at_idirect.com>, sfware_at_idirect.com says...
>
>Can anyone tell me if it is possible (and if so, how) to nest DECODE
>clauses within a select statement?
> <snip>
>select decode(w2,'',
> (select decode(a2,'','nu', a2) from asl where a1 = 'K1' )
>
>, w2) from wms where w1 = 'K1';
Yes, you can nest DECODE's.
The code should be as follows:
SELECT DECODE(W2,'',
(DECODE(A2,'','nu',A2))
FROM AS1
WHERE A1 = 'K1';
-- _________________________________________ | Steve Jakob | Information Systems | London Regional Cancer Centre | sjakob_at_octrf.on.ca |_______________________________________|Received on Fri Feb 21 1997 - 00:00:00 CET