Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL block, won't accept accept
On Jan 29, 11:21 am, "Mitch" <spudtheimpa..._at_gmail.com> wrote:
[]
>
> I am currently looking, but if anyone knows of any tricks/best
> practices to get a user input from within a PL/SQL block (If possible,
> which it looks like it isnt), it would be appreciated.
>
> Cheers.
>
> Mitch
Mitch,
Stop and think for a minute. PL/SQL is a server programming language. There is no user to get input from. Yes you compile PL/SQL from the SQL*Plus tool, but you do not run it on the client side. PL/SQL executes within the server. So there are no tricks to allow you to get user input. That is when front end tools like SQL/Plus or application languages like Oracle FORMS or interface libraries like ProC are used.
So if your procedure needs inputs, then make them parameters. Then you
can compile your procedure
After it compiles cleanly, then in a separate SQL script, you can run
it. (IOW, split your workaround into two parts)
HTH ed Received on Wed Jan 31 2007 - 13:24:45 CST