PL/SQL equivalent of ACCEPT command?

PL/SQL equivalent of ACCEPT command?

Post by Donald Mac » Tue, 12 Nov 2002 06:28:17



Hi,

I'm wondering if there's an easy way to get interactive
input from the user while executing a PL/SQL
procedure. SQL*Plus has the ACCEPT command
but is there something like a
dbms_output.get_line that reads from the keyboard
instead of the built-in buffer?

Donald

 
 
 

PL/SQL equivalent of ACCEPT command?

Post by Jim Kenned » Tue, 12 Nov 2002 06:43:34


No.  Could read from a file.
Jim

Quote:> Hi,

> I'm wondering if there's an easy way to get interactive
> input from the user while executing a PL/SQL
> procedure. SQL*Plus has the ACCEPT command
> but is there something like a
> dbms_output.get_line that reads from the keyboard
> instead of the built-in buffer?

> Donald


 
 
 

PL/SQL equivalent of ACCEPT command?

Post by Finn Ellebaek Nielse » Tue, 12 Nov 2002 17:47:49


Hi Donald.

When your're running your stored procedure you don't have any user interface
attached -- you are running inside the database. You need to code the user
interface in the tool you use to call the stored procedure (SQL*Plus, Forms,
JDeveloper, Visual Basic etc).

HTH.

Finn

--
---------------------------------------------------------------------------
 Finn Ellebaek Nielsen                           ChangeGroup ApS
 Product Manager, Principal Consultant, Partner  Kronprinsessegade 54, 4.

 Mobile: +45 20 32 49 25                         Denmark
 Phone:  +45 33 32 77 78                         http://www.changegroup.dk
---------------------------------------------------------------------------
                      "Where do you want to GPF today?"

Quote:> Hi,

> I'm wondering if there's an easy way to get interactive
> input from the user while executing a PL/SQL
> procedure. SQL*Plus has the ACCEPT command
> but is there something like a
> dbms_output.get_line that reads from the keyboard
> instead of the built-in buffer?

> Donald

 
 
 

1. Does the accept command work in PL/SQL?

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.

Yong



2. Reporting Options for a Data Warehouse.

3. ACCEPT COMMAND USE IN PL/SQL

4. Moving Transaction Log

5. Oracles handling of equivalent SQL statements and PL/SQL progs

6. dbase help

7. Is it possible to accept input from a user in PL/SQL

8. HELP!accept user input and check input value (PL/SQL)

9. Need advice on SQL*Plus Command - ACCEPT

10. Looking for equivalent MS SQL for MySQL ...... Command

11. Oracle select command equivalent in Sql server help