Powerdesginer generated Oracle 11g combined trigger code compilation error: PLS-00103

Source: Internet
Author: User

Problem Description:

Using POWERDESIGNER15 to create a physical data model for Oracle 11g, you want to implement a field that is self-increasing using the following steps:

1, create a sequence, named Sequence_1;

2, in the Self-increment field edit window, select sequence sequence_01;

3, the Table Window preview tab, generate code copied to Sqldeveloper 11gr2 execution, compilation error:

Powerdeginer generated part of the code:

-------------------------------------------------------------------

Create or Replace Trigger Compoundupdatetrigger_user1
For update on USER1 compound trigger
Declaration
Body
Before statement is
Begin
NULL;
End Before statement;

Before each row is
Begin
NULL;
End before each row;

After all row is
Begin
NULL;
End after each row;

After statement is
Begin
NULL;
End after statement;

END
/

-------------------------------------------------------------------

Trigger compilation errors are as follows

Error: PLS-00103: the symbol "End-of-file" appears when the following is required:; <an identifier> <a double-quoted delimited-identifier> symbol ";" is replaced with "End-of-file" after continuing.

Problem solving;

1, the generated code in//modified into--

2. Add a semicolon after end (;)

As follows:

-------------------------------------------------------------------

Create or Replace Trigger Compoundupdatetrigger_user1
For update on USER1 compound trigger
--declaration
-Body
Before statement is
Begin
NULL;
End Before statement;

Before each row is
Begin
NULL;
End before each row;

After all row is
Begin
NULL;
End after each row;

After statement is
Begin
NULL;
End after statement;

END;
/

-------------------------------------------------------------------

Compile success prompt:

Compounddeletetrigger_user1 has been compiled

Summarize:

In Sqldeveloper, when you create a trigger, you add a semicolon at the end (;) and slash (/)

1, semicolon (;) is the end of the statement block identification;

2, the slash (/) is the statement block execution of the identity;

Powerdesginer generated Oracle 11g combined trigger code compilation error: PLS-00103

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.