Results 1 to 3 of 3

Thread: Ora-01795

  1. #1
    Join Date
    Oct 2003
    Posts
    232

    Ora-01795

    ERROR: ORACLE prepare error: ORA-01795: maximum number of expressions in a list is 1000. SQL
    statement: SELECT "LVN_PLCY_NBR", "LVN_CLCTN_CD", "LVN_SS_DT", "LVN_PLCY_ID" FROM
    draeafdw.LDT_PLCY_SS WHERE ( ("LVN_SS_DT"
    =TO_DATE('31JUL2004','DDMONYYYY','NLS_DATE_LANGUAG E=American') ) AND ( ("LVN_PLCY_NBR" IN


    how do I get over this limitation
    bigfoots

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,621
    Just a guess, but did you try making the list less than 1000?

    I suspect that what you posted was NOT the statement which failed.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    There are no stupid questions, but there are a LOT of Inquisitive Idiots.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,424
    Quote Originally Posted by sjumma
    ERROR: ORACLE prepare error: ORA-01795: maximum number of expressions in a list is 1000. SQL
    statement: SELECT "LVN_PLCY_NBR", "LVN_CLCTN_CD", "LVN_SS_DT", "LVN_PLCY_ID" FROM
    draeafdw.LDT_PLCY_SS WHERE ( ("LVN_SS_DT"
    =TO_DATE('31JUL2004','DDMONYYYY','NLS_DATE_LANGUAG E=American') ) AND ( ("LVN_PLCY_NBR" IN


    how do I get over this limitation
    The maximum nmber of elements in an IN clause is 1000. This limitation is only on hardcoded elements. You can always setup a table and use a select for any number of elements. For example.

    create table my_selections (selections varchar2(40));

    insert 2000 items into my_selections then use

    where ... IN (select selections from my_selections)...
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •