Re: PL/SQL: weird 'fetch out of sequence' error

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Tue, 21 Jan 2003 22:04:27 +0300
Message-ID: <b0k5ju$9gr$1_at_babylon.agtel.net>


"PJ Pugh" <msee90+2_at_yahoo.com> wrote in message news:3e2d7da3_at_rpc1284.daytonoh.ncr.com...
> The NULL
> statement does exactly what you need - it executes no specific action, and
> tells the compiler
> that this option in your IF statement should not take any action. You need
> something like
> this in your clause with the DBMS_OUTPUT statement, as that statement alone
> is not valid
> (obviously) :-)

Hmm... Not that obvious to me how a perfectly valid PL/SQL statement (a procedure call) is not valid in this particular situation... For instance, I can label it (and I can only label statements):

SQL> set serveroutput on
SQL> begin
  2 <<a_label>>
  3 dbms_output.put_line('Hello there!');   4 end;
  5 /
Hello there!

PL/SQL procedure successfully completed.

Can you explain why you think that a call to DBMS_OUTPUT is not a valid statement and an extra NULL; statement is necessary?

-- 
Vladimir Zakharychev (bob_at_dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.
Received on Tue Jan 21 2003 - 20:04:27 CET

Original text of this message