简体   繁体   English

琐碎的PL / SQL块会产生令人沮丧的PLS-00103错误

[英]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. 我可能会有点发疯,但是我不断收到PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following...错误PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following... I have pared my program down to the following: 我已将程序缩减为以下内容:

BEGIN
    NULL;
END;
/

Which I am running within AquaData Studio. 我正在AquaData Studio中运行。

This produces: 这将产生:

  • [Error] Script lines 1-2 ... ORA-06550: line 2, column 8: [错误]脚本第1-2行... ORA-06550:第2行,第8列:
  • PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following...; PLS-00103:预期以下情况之一时遇到符号“文件结束”; Script line 2, statement line 2, column 8 脚本第2行,语句第2行,第8列

I write a decent amount of PL/SQL and normally the above trivial block runs just fine. 我编写了大量的PL / SQL,通常上述琐碎的块运行良好。 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. 事实证明,该解决方案是@a_horse_with_no_name在他的评论中建议的。 In ADS, you need to open File → Options Ctrl + , (that's a comma!) and set the following options on the General tab: 在ADS中,您需要打开File→Options Ctrl + (这是逗号!),然后在General选项卡上设置以下选项:

  • ';' ';' 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: 这样做,所有的工作: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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