Table not getting updated with the values set.

Julia Kurakula 41 Reputation points

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';
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.
36,525 questions
{count} votes