decode function please help

From: inna <mednyk_at_hotmail.com>
Date: 10 May 2002 07:37:21 -0700
Message-ID: <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 - 16:37:21 CEST

Original text of this message