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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Read user input inside plsql code

Re: Read user input inside plsql code

From: Arun Annamalai <oracle_at_shakaboom.com>
Date: Mon, 12 May 2003 15:26:42 -0800
Message-ID: <F001.0059748A.20030512152642@fatcity.com>


You can use dbms_alerts and dbms_pipe message to read from pl/sql block.

(Its been while I have done this)

-Arun.
----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com> Sent: Monday, May 12, 2003 12:27 PM

>
> You will need to do any user interaction from
> within SQLPLUS, then use the results in your
> PL/SQL block.
>
> Jared
>
> On Monday 12 May 2003 09:17, Kader Ben wrote:
> > Hi Listers,
> >
> > I'm about writing a code to prompt user to enter some
> > data and the code do some verification and
> > subsequently prompt him for further information.
> > Basically the pseudocode looks like the following:
> >
> >
> > define a = Y ;
> > define b = N;
> > define c = 10;
> > accept a prompt 'Enter value of a: ';
> >
> > BEGIN
> > IF('&&a' = 'Y')
> > THEN
> > DBMS_OUTPUT.PUT_LINE('Enter value of c :');
> > ACCEPT c;
> > IF &&c = 10 THEN
> > -- do some staff
> > END IF;
> > ELSIF('&&a' = 'N')
> > THEN
> > -- do other treatment
> > END IF;
> > END;
> > /
> >
> >
> > The problem the ACCEPT nor PROMPT doesn't work inside
> > the
> > PL/SQL code. Do you have any suggestion to do the code
> > interact with user?
> >
> > Thank you in advance.
> >
> >
> > Ben
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo.
> > http://search.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jared Still
> INET: jkstill_at_cybcon.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Arun Annamalai
  INET: oracle_at_shakaboom.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon May 12 2003 - 18:26:42 CDT

Original text of this message

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