4

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?

Nakilon
  • 32,203
  • 13
  • 95
  • 132
Thiago Alves
  • 53
  • 1
  • 5

4 Answers4

3

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

TastyWheat
  • 1,565
  • 1
  • 9
  • 8
0

can you try this:

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

by removing /

Ersin Gülbahar
  • 6,344
  • 14
  • 54
  • 105
  • Still no good: `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')` – Thiago Alves Dec 19 '16 at 14:35
0

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

0

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

Lexuslll
  • 1
  • 1