Limitation in oracle db list query

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Limitation in oracle db list query

    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..

    kishoreb Guest

  2. Similar Questions and Discussions

    1. Get list of all Field Names in ORACLE DB
      I'm wondering if there is a way I can list all of the field names in an Oracle table easily? Any ideas?
    2. query with oracle 10g
      hi all, i run this query in toad and it works but when i try to use it in coldfusion i have no records select...
    3. ColdFusion+cfquery+Oracle+CLOB+"Query of Query"
      Error message is: Query Of Queries runtime error. Unsupported SQL type "java.sql.Types.CLOB". My database table: RESMIGAZETEFIHRISTI: ...
    4. Convert a query to a list, or find an item in a query
      Hi All, I am using CFPOP to retrieve mail from a server, then delete each message after I retrieve it. What I want to do is to check that I don;t...
    5. Oracle SQL query
      Hi, My Oracle sql isn't very good, I need to select from a table events that occurred + / - 28 days from now. So, SELECT blah from table_blah...
  3. #2

    Default Re: Limitation in oracle db list query

    It's a limitation in Oracle. Google for error message ORA--01795

    This link will give you a workaround:
    [url]http://www.dbforums.com/showthread.php?t=1004840&goto=nextoldest[/url]

    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))
    ...

    Kronin555 Guest

  4. #3

    Default Re: Limitation in oracle db list query

    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.

    Dan Bracuk Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139