Oracle in expression parameters support up to 1000 maximum

Source: Internet
Author: User
Tags subq

Oracle in expression parameters support up to 1000 maximum

The method is split into multiple col in ... or col in ...

#region solve problems greater than 1000 private string getsubquery (string riskids) {int strparalen = riskids.length; String SUBQ = String.            Empty;            SUBQ = Subq + "("; if (! "".                Equals (riskids) && null! = Riskids) {string[] Riskids = Riskids.split (', ');                    if (Riskids.length >) {for (int i = 0; i < riskids.length; i++) {if ((i + 1)% = = 0) {String t                            EMP = subq.substring (0, subq.length-1); SUBQ = string.                            Empty;                            SUBQ = Subq + temp;                            SUBQ = Subq + ") OR To_char (Zfid) in (";                        SUBQ = Subq + riskids[i] + ",";                        } else {subq = Subq + riskids[i] + ",";}} String s_temp = subq.substring (0, subq.length-1); SUBQ = string.                    Empty;                    SUBQ = Subq + s_temp;                SUBQ = Subq + ")";                    } else {subq = Subq + riskids;                SUBQ = Subq + ")";            }} else {SUBQ = Subq + ")";        } return subq.tostring ();  }

The incoming parameter is a "1,2,3,4" form of string, delimiter ",";

Borrowed from the http://eric-yan.iteye.com/blog/1942713

Oracle in expression parameters support up to 1000 maximum

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.