Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Does the accept command work in PL/SQL?
y0h8797_at_acs.tamu.edu wrote:
>
> At SQL> prompt, I can type ACCEPT MY_DAY NUMBER PROMPT 'Enter: '
> and it works OK. But when I put this in a procedure like in
> create or replace procedure my_proc as
> begin
> accept my_day number prompt 'Enter a day: '
> it won't compile. The error message points an error at my_day or
> if certain parentheses are put in there (for trial&error),
> points at prompt. It never says accept is wrong. Can anybody
> tell me how to use accept in a PL/SQL procedure? Thanks.
>
Put the ACCEPT in a script and then call the SP with the data the user entered.
-- Tomm Carr -- "Can you describe your assailant?" "No problem, Officer. That's exactly what I was doing when he hit me!"Received on Tue Jul 22 1997 - 00:00:00 CDT