facebook

SQL Exception running normal PL/SQL block

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #245781 Reply

    Shouldn’t this work?

    DECLARE
    foo VARCHAR2(1000) := 'Test';
    BEGIN
        SELECT 'foo' INTO foo FROM DUAL;
    END;

    Because when I do, I get an ORA-00900: Invalid SQL statement error and looking in the SQL history it shows up as three separate statements. I can run this fine in both TOAD and SQL*Plus.

    Thanks.

    #245789 Reply

    Brian Fernandes
    Moderator

    That is because we haven’t really set out to support the execution of anonymous blocks of PL/SQL, but we do intend to support the creation and updation of procedures, packages, package bodies, functions and triggers among others.

    Having said that, I will check internally whether we can support something like this.

    We will be reviewing this shortly, but could you do us a favor by listing out what other kind of block statements you would like to see supported in the MyEclipse SQL editor? Perhaps you could run through your script library and see what currently does not run with MyEclipse. By block statements I mean a bunch of statements that should be sent to the server in a single go, not separate statements like the how your example above was (incorrectly) sent.

    Your suggestions would help focus our efforts in the right direction.

    Best,
    Brian.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: SQL Exception running normal PL/SQL block

You must be logged in to post in the forum log in