PL/SQL on SquirreL SQL Client 3.7.1

5.2k views Asked by At

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?

4

There are 4 answers

0
TastyWheat On BEST ANSWER

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.

enter image description here

1
CompEng On

can you try this:

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

by removing /

0
Lexuslll On

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

0
user3239800 On

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