If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Ora-01795

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,571
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.
Don't say, show. Don't promise, prove.
Reply With Quote
  #3 (permalink)  
Old
Lead Application Develope
 
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 2,412
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On