Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ACCEPT in SQL*Plus
"Francesco Sblendorio" <sblendorio_at_despammed.com> writes:
>> ACCEPT is an SQL*Plus command, not a PL/SQL keyword. Read the
>> SQL*Plus manual, it has complete descriptions for all commands with
>> numerous examples.
>
> Thank you, I'll read the maual for code examples in SQL*Plus. My problem is
> however to have an interactive input in a little PL/SQL script.
> Can I do some interactive input within SQL*Plus into a PL/SQL script?
As Francesco pointed out. accept is _not_ a PL/SQL command so you have to make it a host variable. Here is an example.
Harald
,----
| variable abc number; | accept abc; | | begin | dbms_output.put_line( :abc ); | end; | /