Trivial PL/SQL block generating frustrating PLS-00103 error

只谈情不闲聊 提交于 2019-12-12 02:43:53

问题


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?


回答1:


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:



来源:https://stackoverflow.com/questions/33617220/trivial-pl-sql-block-generating-frustrating-pls-00103-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!