PL/SQL on SquirreL SQL Client 3.7.1

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 17:37:32

问题


I was trying to execute PL/SQL scripts on SQuirrel but it doesn't seem to work.

I configured Oracle Thin Driver by adding ojdbc7.jar on "Extra Class Path", was able to connect to the database but when tried to run a simple code it gives an error:

-- code
BEGIN
  dbms_output.put_line('Hello World');
END;
/

-- error
Error: ORA-06550: line 2, column 37:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

:= . ( % ;

SQLState:  65000
ErrorCode: 6550
Error occurred in:
BEGIN
  dbms_output.put_line('Hello World')

Am I doing anything wrong?


回答1:


This statement worked for me (the / is necessary for SQuirrel SQL Client):

BEGIN
    dbms_output.put_line('Hello World');
END;
/

However, you won't see the output in the usual Results tab. You need to open the Oracle Database Output window. As far as I can see you can only open it with a button on the toolbar. You'll also need to enable auto refresh or manually refresh the output.




回答2:


can you try this:

BEGIN
  dbms_output.put_line('Hello World');
END;

by removing /




回答3:


When installing the SQuirreL, try including the Oracle Plugin. This works for me in version 3.8.1.




回答4:


Oracle plugin for Squirrel is needed for executing queries in BEGIN - END; Had the same problem untill reinstalled squirrel with Oracle plugin.



来源:https://stackoverflow.com/questions/41224740/pl-sql-on-squirrel-sql-client-3-7-1

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