Maximum number of Oracle multi-value query parameters

  • Last update:  2021-11-23
  • I.Overview 

    1) Problem description  

    If you use in filtering to view Oracle data, an error occurs when the number of parameters is greater than 1000.  The specific error message is:Error code :11300001 Dataset configuration error.Expression tree is too large(maximum depth 1000)

    As shown below:

    1.png

     2) Solution

    To solve this problem, you can use the or keyword to replace the in keyword in Oracle queries to achieve the same function.  Such as:  

     select * from SORDERDETAIL where ORDERID  in ('10001','10002','10003','10004')

    Can be rewritten as:

    select * from SORDERDETAIL where ORDERID ='10001' or  ORDERID='10002' or ORDERID='10003' or ORDERID='10004'

    II. Steps 

    1. Writing query SQL  

    Create a regular report and write the SQL query statement. In the SQL statement, use the "= "sign instead of the "in" keyword.  

    select * from  SORDERDETAIL where ORDERID='${id}'

    As shown below:

    2.png


    2.Configuring the drop-down check box data dictionary  

    Configure the data dictionary according to the actual situation of the project. Here I use the ID values from 1 to 1001 automatically generated by the formula.  The formula is: range(10001,11113)  

    3.png


    3. Configuring delimiters  

    Set the delimiter to 'or ORDERid ='  

    4.png


    4.Preview effect  

    Save the template, click "Pagination Preview", the effect is as shown below:  

    5.png

    III. Precautions  

    If occurs: SQL attack injection attacks are suspected because the disabled special keywords are used. If you have special needs, contact the system administrator.  

    Then enter the decision-making platform as the administrator, clickManage>Security>Anti-SQL injection,click \b(?  I)or\b field in the selected keyword, and then let it change into the unselected keyword.  As shown below:  

    IV. Completed template 

    The template is complete. For details, see: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Parameter\Maximum_number_of_Oracle_multi-value_query_parameters.cpt

    Click to download the template:

    Maximum_number_of_Oracle_multi-value_query_parameters.cpt


    Attachment List


    Theme: Parameter
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy