0
Limitation in oracle db list query
New Here
,
/t5/coldfusion-discussions/limitation-in-oracle-db-list-query/td-p/749245
May 02, 2006
May 02, 2006
Copy link to clipboard
Copied
I am getting the error while retrieving the records and
exporting them to excel sheet where i had a query as follows
select * from FEEDBACK_IN Where feedback_in.case_id IN ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) , (param 7) , (param 8) , (param 9) , (param 10) , (param 11) , (param 12) , (param 13)……………………….(param 5000))
If the list exceeds the 1000 records the error occurs from the oracle database.
Is there any way to handle this situation to export the data to the excel sheet..
select * from FEEDBACK_IN Where feedback_in.case_id IN ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) , (param 7) , (param 8) , (param 9) , (param 10) , (param 11) , (param 12) , (param 13)……………………….(param 5000))
If the list exceeds the 1000 records the error occurs from the oracle database.
Is there any way to handle this situation to export the data to the excel sheet..
TOPICS
Database access
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Advocate
,
/t5/coldfusion-discussions/limitation-in-oracle-db-list-query/m-p/749246#M69799
May 02, 2006
May 02, 2006
Copy link to clipboard
Copied
It's a limitation in Oracle. Google for error message
ORA--01795
This link will give you a workaround:
http://www.dbforums.com/showthread.php?t=1004840&goto=nextoldest
Basically, you need to avoid sending IN lists that contain more than 1,000 items. You can do this one of two ways...
WHERE blah IN (1, 2, ..., 1000) OR blah IN (1001, 1002, ...., 2000) ...
-or-
(SELECT * FROM mytable WHERE blah IN (1, 2, ..., 1000))
UNION
(SELECT * FROM mytable WHERE blah IN (1001, 1002, ..., 2000))
...
This link will give you a workaround:
http://www.dbforums.com/showthread.php?t=1004840&goto=nextoldest
Basically, you need to avoid sending IN lists that contain more than 1,000 items. You can do this one of two ways...
WHERE blah IN (1, 2, ..., 1000) OR blah IN (1001, 1002, ...., 2000) ...
-or-
(SELECT * FROM mytable WHERE blah IN (1, 2, ..., 1000))
UNION
(SELECT * FROM mytable WHERE blah IN (1001, 1002, ..., 2000))
...
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/coldfusion-discussions/limitation-in-oracle-db-list-query/m-p/749247#M69800
May 02, 2006
May 02, 2006
Copy link to clipboard
Copied
There might be an easier way, depending on where your 5000
list items come from. If they come from a query, you can use
queries of queries. If they come from cffile, you and use cfhttp to
create a query and then use query of queries.
As it so happens, this very thing is a potential problem with my current project, and I'm hoping the QofQ approach will work.
As it so happens, this very thing is a potential problem with my current project, and I'm hoping the QofQ approach will work.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

