Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie PL/SQL question

Re: Newbie PL/SQL question

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Thu, 6 Apr 2000 09:19:34 +0200
Message-ID: <8chdqj$a8q$1@news6.isdnet.net>


Accept is a SQL*Plus command not a PL/SQL statement so you can't execute it in a PL/SQL block.

Instead you can do:
accept lastname char Prompt 'Enter : '; begin

   <use &lastname>
end;
/

--
Have a nice day
Michel

Matthew Tan <tankc_at_singnet.com.sg> a écrit dans le message : 8cha1l$bb9$1_at_clematis.singnet.com.sg...
> Hello,
>
> I am currently running Personal Oracle 8 on my Windows 98 PC. I have
tried
> running
> this statement encountering errors.
>
> SQL> begin
> 2 accept lastname char Prompt 'Enter : ';
> 3 end;
> 4 /
> accept lastname char Prompt 'Enter : ';
> *
> ERROR at line 2:
> ORA-06550: line 2, column 9:
> PLS-00103: Encountered the symbol "LASTNAME" when expecting one of
the
> following: := . ( @ % ;
>
> Why is this so ?
>
> Thanks in advance !
>
>
>
Received on Thu Apr 06 2000 - 02:19:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US