Batch execution of Oracle SQL statements in code

Source: Internet
Author: User
Tags bulk insert

Today is writing a tool (WinForm) that functions as a bulk insert OR UPDATE to a table in the Oracle database.

Execution of the time always error "[911] ora-00911:invalid character"

  I copy the SQL statements out to PL SQL to execute, and that's right, because the test is just a statement, and I generated the statement at the end of each sentence added ";".

Baidu a bit, said is a semicolon problem, decisively remove the semicolon execution, is right.

But always feel a large segment of SQL does not split, more than the time should have a problem (no test) and poor readability, and then check the syntax of the batch execution.

The following methods are determined as follows:

  Begin

SQL1;

SQL2;

...

  END;

Debug through!

Batch execution of Oracle SQL statements in code

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.