Table not getting updated with the values set.

Julia Kurakula 41 Reputation points
2023-04-11T16:11:45.7166667+00:00

abc.ksh script :- declare
cursor c_transfer is
SELECT pers_id, ps_expiration_date, new_expiration_date
FROM ts_craft_transfer
WHERE process_flag = 'Y';
begin
for crec in c_transfer loop update hr_people_hist set expiration_date = crec.new_expiration_date
where pers_id = crec.pers_id
and expiration_date = crec.ps_expiration_date; dbms_output.put_line( to_char(SQL%ROWCOUNT) || ' rows_updated');
dbms_output.put_line ('pers_id = ' || crec.pers_id);
dbms_output.put_line ('ps_expiration_date = ' || crec.ps_expiration_date);
dbms_output.put_line ('new_expiration_date = ' || crec.new_expiration_date);
dbms_output.put_line (' ' ); end loop;
end; when above script is run, the hr_people_hist table must be updated with the new_expiration_date, same as the date in ts_craft_transfer table (i.e, 29-MAR-2050). But it is not updating the values as desired after the above script is run. what am I missing here? These are the values in ts_craft_transfer table: ps_expiration_date: ('02-FEB-2050','DD-MON-YYYY'), new_expiration_date('29-MAR-2050','DD-MON-YYYY'),'Y',sysdate)); These are the values in the hr_people_hist table : expiration_date: ('02-FEB-50','DD-MON-RR')

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,795 questions
{count} votes