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

Home -> Community -> Mailing Lists -> Oracle-L -> ampersand problem

ampersand problem

From: Vijaya Chander V.S <srinivasa_v_at_infy.com>
Date: Wed, 03 Oct 2001 23:05:49 -0700
Message-ID: <F001.003A1714.20011003232018@fatcity.com>

Hi Gurus,

declare

    v_empno number:=&empno;
    v_sal number:=&sal;
    ok1 varchar(1);
begin

    dbms_output.put_line('Do you want to update the sal...(Y/N)');

        if (upper('&ok1') = 'Y') then
            update emp set sal=v_sal where empno=v_empno;
        end if;

end;

In the above code if i want to get the 'Do you want to update the sal...(Y/N)' before the variable ok1 what should i do.. my requirement is that i will take the empno and sal first and prompt for updating.if i enter 'Y' then i will update the sal.. else i dont.but according to the above code i am begin asked to enter empno,sal and variable ok1 at the first instance.. pl help me about this issue...
--

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

Author: Vijaya Chander V.S
  INET: srinivasa_v_at_infy.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
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 Thu Oct 04 2001 - 01:05:49 CDT

Original text of this message

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