Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> plsql prompt for input

plsql prompt for input

From: Maryann Atkinson <maryann_30_at_yahoo.com>
Date: Tue, 17 Feb 2004 19:03:37 -0500
Message-Id: <5.2.1.1.2.20040217164527.00b74d38@pop.netaddress.com>


I am trying to write a pl/sql script that will prompt the user for an id, and then somehow I need to re-prompt the user to verify that indeed this is the correct id.

The one below seems like it should work, except because of buffer issue(I guess)
I dont get to see the line that prompts the user if its correct. Anyone has an idea how it can be improved?

thx
maa

SET VERIFY OFF
ACCEPT Emp_ID Prompt 'Please Enter the Employee ID > '

DECLARE
    Response VARCHAR2(1);

BEGIN

     DBMS_Output.Put_Line('Employee ID entered is ' || &Emp_ID
                        || '. Is this correct?(Y/N)');

     Response := &&Response;
     DBMS_Output.Put_Line('Response is ' || Response);
END;
/

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Tue Feb 17 2004 - 18:03:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US