Thiago Alves
Thiago Alves

Reputation: 53

PL/SQL on SquirreL SQL Client 3.7.1

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?

Upvotes: 4

Views: 5581

Answers (4)

Lexuslll
Lexuslll

Reputation: 1

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

Upvotes: 0

user3239800
user3239800

Reputation: 1

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

Upvotes: 0

TastyWheat
TastyWheat

Reputation: 2317

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

Upvotes: 4

CompEng
CompEng

Reputation: 7376

can you try this:

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

by removing /

Upvotes: 0

Related Questions