Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> SELECT within a DECODE alternatives??

SELECT within a DECODE alternatives??

From: Hamm <robin_at_topniveau.net>
Date: 22 Jun 2001 02:18:32 -0700
Message-ID: <c77120c.0106220118.2f16a6b0@posting.google.com>

I was browing through dejanews and found out there is no support for the select statement within a decode for the version of oracle I am using (8.0.6 I believe)

The problem is I need an alternative now. I am working on a series of statements, with the core of the problem being a series of if statements (nested decodes), but the criteria is that a certain field exists in a lookup table ie. something like

SELECT DECODE(SELECT FIELD FROM TABLEa A WHERE A.FIELD = 'VALUE',

              NULL, 
              DECODE(..another nested decode..), 
              NULL )

FROM TABLEb
WHERE bunch of criteria

Is there an alternative for this in pure sql? Received on Fri Jun 22 2001 - 04:18:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US