data update in a cursor
Date: Wed, 18 Nov 1998 08:23:14 GMT
Message-ID: <72tsks$kf4$1_at_kraken.itc.gu.edu.au>
HiYa
I have not used this before, however I thought that this would work, the documentation seems to suggest it should work. The code executes fine, but nothing is put into the field valid_flag???
what am I doing wrong??
I can get it to work another way, but I wanted to get this working ...
Thanks
set serveroutput on
declare
l_today date; l_pr_group GLF_PGRP_LDG.pgrp_name%type;
--cursor to cycle through each item in the temp table CURSOR C_ACCNT_NR is
select cost_code , valid_flag
from fn_temp
for update of valid_flag;
begin
dbms_output.enable(100000);
select sysdate
into l_today
from dual;
l_pr_group := 'GRIF'||to_char(l_today,'YY');
FOR someone in C_ACCNT_NR LOOP
IF CA00.CHECK_ACCOUNT(someone.cost_code , l_pr_group) THEN someone.valid_flag := 'Y'; dbms_output.put_line(someone.cost_code||' is valid'); ELSE someone.valid_flag := 'N'; dbms_output.put_line(someone.cost_code||' is not valid'); END IF;
END LOOP;
commit;
end;
/
See Ya
(when bandwidth gets better ;-)
Chris Eastwood
Photographer, Programmer email ua.ude.ug.cti_at_doowtsae.c Motorcyclist and dingbat WWW http://chrise.itc.gu.edu.au
please remove undies for reply
Ohhh ... you work all day, slave over a hot stove all night yet you *still* have time for sadomasochism ... how do you do it?
A little man hurts me.
<ding>
Oh Mister Mean ... Oh Mister Mean
15 Minutes with him and you'll be blue and green
Studded belts and leather whips
Bondage trousers on his hips
Wack and punish as you dust with Mister Mean
Ohhhh he whips me around the house in minutes ... lets get cracking ...
Received on Wed Nov 18 1998 - 09:23:14 CET