Re: decode function please help

From: J.P. <jp_boileau_at_yahoo.com>
Date: 10 May 2002 12:32:24 -0700
Message-ID: <7e388bc3.0205101132.7ac0c1b4_at_posting.google.com>


You'd be better off to use a look-up table and do a join...

Other than that, sorry, I can't help.

JP

mednyk_at_hotmail.com (inna) wrote in message news:<347a408b.0205100637.1fdce0a1_at_posting.google.com>...
> I have query with multiple choice of possibilities for decode function
> that have the same output
> it is like select DECODE(table.feld, 1, 'SITE',
> 2, 'SITE'
> 3, 'SITE',
> 4, 'TEAM',
> 5, 'TEAM',
> 6, DECODE
> (FUNCTION(PARAMETER), '',
> 'PROJECTMGR',
> 'ADMINISTARTOR'),
> 7, DECODE
> (FUNCTION(PARAMETER), '',
> 'PROJECTMGR',
> 'ADMINISTARTOR'),
> 8, DECODE
> (FUNCTION(PARAMETER), '',
> 'PROJECTMGR',
> 'ADMINISTARTOR'))
> AS DISPLAYNAME
> FROM TABLE;
> With Oracle 8i I did not have any problems, but with 9i it complains:
> "ORA-00939: too many arguments for function"
> In sql I can put all possibility in the list like:
> case when table.feld in (1,2,3) then 'SITE' ,
> when table.feld in (4,5) THEN 'TEAM' ,
> WHEN table.feld in (6,7,8) THEN
> CASE ....... ETC.
> Can we have something similar in Oracle.
> Thank you.
Received on Fri May 10 2002 - 21:32:24 CEST

Original text of this message