Home » SQL & PL/SQL » SQL & PL/SQL » Case Limitations (9iR2 & 10gR2 )
Case Limitations [message #443530] Tue, 16 February 2010 02:48 Go to next message
papu
Messages: 27
Registered: March 2005
Location: Dhaka
Junior Member

Hi all

i am using Case Statement in a query which has 214 comparisons.
while this query runs in 9iR2 version, it successfully dislays output. but when i run the same query in 10gR2 version it gives the following message

ERROR at line 2: ORA-00939: too many arguments for function

after through checking, i reduced no of comparisons from 214 to just 128 comparisons. then it successfully executes.

Any suggestions will be highly useful.

regards

papu
Re: Case Limitations [message #443532 is a reply to message #443530] Tue, 16 February 2010 02:52 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Nothing prevent you from using another CASE in the first CASE ELSE part like in the following.
CASE WHEN c1 THEN ...
     WHEN c2 THEN ...
     WHEN c3 THEN ...
END
CASE WHEN c1 THEN ...
     ELSE CASE WHEN c2 THEN ...
               WHEN c3 THEN ...
          END
END

Regards
Michel
Re: Case Limitations [message #443535 is a reply to message #443530] Tue, 16 February 2010 02:59 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Which version of 10g are you using?

I just ran a SELECT CASE... with 300 WHEN clauses in it without any problems.
Previous Topic: How to read oracle diagram in the documentation?
Next Topic: Lexical Parameter Slow down query
Goto Forum:
  


Current Time: Wed Dec 07 08:40:35 CST 2016

Total time taken to generate the page: 0.08478 seconds