Urgent: Information required about Error Code ORA-1795

From: R197509 <ramsunders_at_yahoo.com>
Date: 15 Mar 2002 02:28:31 -0800
Message-ID: <1e562f83.0203150228.6eae439e_at_posting.google.com>


Hi,

   We have a query which does a delete based on a range of values.    Delete table_x where pk in (1,2,3,4,5);    This list is created dynamically and the number of elements varies depending on the records in the database.

   While testing, we had around 550 values in the list and the execution of this statement gave us the ORA-1795 error.

   The Oracle documentation gives the following information on this error code:
ORA-01795 maximum number of expressions in a list is 1000 Cause: More than 254 columns or expressions were specified in a list. Action: Remove some of the expressions from the list.

   I have a couple of doubts on this.
   Does this error code mean to say that the number of elements in the list should be less than 254?

   Does it imply that the total length of the expression (between the brackets) should be less than 1000?

   If the above two are indeed the right interpretation, how do we go about handling such a SQL statement wherein the number of elements in the list is dynamic?

   Also, if we use a sub-query instead of a literal list, then is there some kind of limitation on the number of records that the subquery is allowed to return. For E.g. would the following also give ORA-1795?
   Delete table_x where pk in (select pk from table_x where rownum < 100000);
   

Any help is appreciated.
Regards,

Ramsunder. Received on Fri Mar 15 2002 - 11:28:31 CET

Original text of this message