简体   繁体   中英

Trivial PL/SQL block generating frustrating PLS-00103 error

I may be going a bit insane, but I keep getting a PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following... error. I have pared my program down to the following:

BEGIN
    NULL;
END;
/

Which I am running within AquaData Studio.

This produces:

  • [Error] Script lines 1-2 ... ORA-06550: line 2, column 8:
  • PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following...; Script line 2, statement line 2, column 8

I write a decent amount of PL/SQL and normally the above trivial block runs just fine. What the heck is wrong with what I'm doing?

It turns out the solution was as suggested by @a_horse_with_no_name in his comment. In ADS, you need to open File → Options Ctrl + , (that's a comma!) and set the following options on the General tab:

  • ';' Statement separator (make sure it is not ticked)
  • '/' at End of Line Terminates Statement (make sure it is ticked)

See screenshot below. Do this, and it all works: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM