"UPDATE" format, need help
Posted in 1995
I and several others have experienced problems trying to use the UPDATE
function in 4gl. Any assistance is appreciated.
I am trying to update a date & time field in one table with the date & time
data of another table where the ticket numbers are the same.
DECLARE fupd_curs CURSOR FOR
SELECT nc_contact_id, nc_log_dt, nc_log_tm,
nr_contact_id, nc_frcv_dt, nc_frcv_tm
FROM metcls, metrcv
WHERE nc_contact_id = nr_contact_id
ORDER BY nr_contact_id -- There may be multiply nr_contact_id's, but
only one nc_contact_id
FOR UPDATE
FOREACH fupd_curs INTO upd_rec
UPDATE metrcv
SET nr_frcv_dt = metcls.nc_log_dt,
nr_frcv_tm = metcls.nc_log_tm
WHERE CURRENT OF fupd_curs
END FOREACH
Not real exact, but I can't get it to work following any of the examples in the
book. Also, there are no examples showing joined tables.
TNKS, Robert