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

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL query not giving desired results...

PL/SQL query not giving desired results...

From: Anil Kanwar <akanwar_at_dh.cit.alcatel.fr>
Date: Tue, 11 Sep 2001 10:31:52 +0530
Message-ID: <3B9D9AC0.302D2EE7@dh.cit.alcatel.fr>


I am using following code to update the fields :
................
................

CURSOR a_profile is

        select profile from account;
.....................
.....................

 select count(*) into rows_no from account;

        for counter in 1..rows_no loop
        fetch a_profile into profile_val;
                if (profile_val != NULL) then
                        select d_inact into d_inact_val from accountp
where profile_val = ri;
                        update account set
                        d_tr = to_char(to_date(d_tac,'DD/MM/YYYY') +
d_inact_val)
                        where profile = profile_val;
                end if;
        end loop;

This pocedure is getting executed successfully but when I see the table account for d_tr it shows no change.Although there are values in d_inact/accountp. I f I replace d_inact_val with a constant say 10, it executes fine.

Please help out.

thanks
Anil Received on Tue Sep 11 2001 - 00:01:52 CDT

Original text of this message

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