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

Home -> Community -> Usenet -> c.d.o.server -> stored proc for update

stored proc for update

From: Rahul Sood <rsood_at_panix.com>
Date: 1998/03/30
Message-ID: <35205C07.DF55A4C@panix.com>#1/1

The following simple update stored proc seems not to be having the desired effect. If I just execute the body of commands in the procedure as an anonymous block, it works. But the same block executed as a stored proc doesn't. Is one of the DMBMS packages reqd for this? I do have DBMS_STANDARD and DBMS_OUTPUT.

select work_tel from tblEmployees where empid=1; // value of work_tel before invoking stored proc
(Output from PL/SQL:)

WORK_TEL



411

create or replace procedure spUpdate(id in number, phone in varchar2) as

begin

    update tblEmployees
    set work_tel=phone
    where empid=id;
    commit;
end;
/
(Output from PL/SQL:) Procedure created

execute spUpdate(1,'5551212');
(Output from PL/SQL:) procedure successfully completed.
select work_tel from tblEmployees where empid=1; // value of work_tel after invoking stored proc
(Output from PL/SQL:)

WORK_TEL



411

the value is unchanged

Pls post, or replies to rsood_at_panix.com Received on Mon Mar 30 1998 - 00:00:00 CST

Original text of this message

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