Home » SQL & PL/SQL » SQL & PL/SQL » Problem with REF cursor (WIN XP, Oracle 10g)
Problem with REF cursor [message #359000] Thu, 13 November 2008 04:54 Go to next message
freakabhi
Messages: 74
Registered: November 2007
Location: mumbai
Member
Is there a limit on the predicate
(I.e. conditions in where clause) exists on the SQLs in the unions clause,

I am facing weired issue with My Ref Cursor which chooses, dynamic SQL on the basis of some condition..

in the SQL there is one condition in SQL, as

'CD = 1 or CD =2 or CD = 3'

it works fine, but when I pass, fourth value as
'CD = 1 or CD =2 or CD = 3 or CD = 4'

it throws, ORA-24338 : Statement Handle not executed,

Please help me in this.

from,
Freakabhi


Re: Problem with REF cursor [message #359010 is a reply to message #359000] Thu, 13 November 2008 05:27 Go to previous messageGo to next message
rodolpho
Messages: 6
Registered: August 2008
Location: Rio de Janeiro, Brazil
Junior Member
Why not use in clasule?

For instance: CD IN (1,2,3,4)
Re: Problem with REF cursor [message #359015 is a reply to message #359000] Thu, 13 November 2008 05:42 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search for "varying in list".

Regards
Michel
Re: Problem with REF cursor [message #359037 is a reply to message #359000] Thu, 13 November 2008 07:36 Go to previous messageGo to next message
freakabhi
Messages: 74
Registered: November 2007
Location: mumbai
Member
thanks for reply,

I got my query solved using IN clause, but still to know,
is there any limit on the number of conditions you can use?
changing CD = 1 OR CD = 2 OR CD = 3 OR CD = 4 to
cd in (1,2,3,4) it works fine, but how does this works?

thanks in advance...
Freakabhi
Re: Problem with REF cursor [message #359038 is a reply to message #359037] Thu, 13 November 2008 07:39 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The limit is 1000.

Regards
Michel
Previous Topic: Extracting a substring from delimited string
Next Topic: Bitmap Index
Goto Forum:
  


Current Time: Sun Dec 04 08:58:00 CST 2016

Total time taken to generate the page: 0.04226 seconds