I'm trying to update records in an oracle table using the values from a SAS table.
I'm testing against a SAS table (instead of the oracle table) using the following
Update Oracle_Table as a
Set FCST_UNTS = (Select FCST_UNTS from SAS_Table as b
where a.Base_Segm_id = b.Base_segm_id and
a.year = b.year and
a.mo = b.mo),
FCST_TONS = (Select FCST_TONS from SAS_Table as b
where a.Base_Segm_id = b.Base_segm_id and
a.year = b.year and
a.mo = b.mo),
FCST_REV = (Select FCST_REV from SAS_Table as b
where a.Base_Segm_id = b.Base_segm_id and
a.year = b.year and
a.mo = b.mo)
where a.Base_Segm_id in (Select Base_segm_id from SAS_Table ) and
a.year in (Select Year fromSAS_Table ) and
a.mo in (Select mo from SAS_Table ) ;
There are 160,428 records in the SAS_TABLE and 409,008 records in the oracle table. I used a smaller version of the tables initially and all seemed to work well.
However it seems to be taking forever to run the full update.
Is there a better way to do this? or do I just need to be patient?