I have to take the data from blood_drives table from today to 3 weeks forward.
Update the ht_coord_goal field with the projection field for the dive date and drive id.
Wrote a small procedure. Just wanted to know if this is the way to go.
CREATE OR REPLACE PROCEDURE ht_coord_goal IS
Cursor C1 is
and drive_cancelled is null
order by drive_date;
Fetch C1 into v_drive_date,
Exit when C1%notfound;
set ht_coord_goal = v_projection
where drive_date = v_drive_date
and drive_id = v_drive_id;
WHEN NO_DATA_FOUND THEN
WHEN OTHERS THEN
-- Consider logging the error and then re-raise