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: PL/SQL - can't accept user input - then how?

RE: PL/SQL - can't accept user input - then how?

From: <Stephen.Lee_at_DTAG.Com>
Date: Tue, 04 Nov 2003 14:29:25 -0800
Message-ID: <F001.005D592F.20031104142925@fatcity.com>

If you already have shell script front end, would it be acceptable to prompt for the input in the shell script rather than in the procedure?

#!/bin/ksh

echo "ENTER LOGIN"
read USER

echo "ENTER PASSWORD"
stty -echo
read PASS
stty echo

echo "ENTER WHAT IT IS"
read INPUT

sqlplus -s <<-XXX

   ${USER}/${PASS}
   exec THE_PROCEDURE('$INPUT')
XXX
> -----Original Message-----
>
> List,
>
> Please forgive the repetitious nature of this query, but I haven't yet
> found an answer that satisfied me.
>
> Environment: AIX 5.1 Oracle 8.1.7
>
> Trying to create an SQL script which calls a procedure to update a
> record based on information provided by the user via a screen
> prompt. I
> know PL/SQL is not interactive by nature.
>
> I have tried the ACCEPT command in the .sql script before the
> procedure
> call, which is wrapped in a shell script but it doesn't wait for my
> input, just carries on executing the rest of the .sql script.
>
> I am now thoroughly confused about how to do this. And I
> doubt I am the
> only one. I do need the user to provide me with a parameter so I can
> locate the record for update.
>
> Don't hesitate to tell me to RTFM or book or website, just
> tell me WHICH
> ONE(S) to read :)
>
> Thanks much,
> Saira
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: Stephen.Lee_at_DTAG.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 Tue Nov 04 2003 - 16:29:25 CST

Original text of this message

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