Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie PL/SQL question
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
![]() |
![]() |