Sept 2021 : NOTE - all required code for this process is found at :
simply copy and place into your preferred SQL tool
/*
If the data just uploaded is deemed to be corrupt or just very incorrect (example: incorrect SDR numbering) and we need to recode in some way, we might want to remove the data from WSDRS and make adjustments to M70 – or possibly purge m70 and return to the insert statements in DATA.TXT, recode and reprocess the data batch.
Note : we do not purge M70_SDR_Transit , until we’re ready to do the next data upload. This gives us some lag time, if someone reports unfixable anomalies in the Production data. Provided these FAA SDR’s have not been attached to any projects in the CAWIS PTS subsystem, we can usually delete the last batch, make our code corrections, and incorporate our last upload with the newest one.
Note : this procedure has never been necessary
*/
DELETE FROM M78_SDR_ACTION_TAKEN
WHERE SDR_NUMBER_NUM IN (SELECT SDR_NUMBER_NUM FROM M70_SDR_TRANSIT);
DELETE FROM M77_SDR_NATURE
WHERE SDR_NUMBER_NUM IN (SELECT SDR_NUMBER_NUM FROM M70_SDR_TRANSIT);
DELETE FROM M74_SDR_JASC
WHERE SDR_NUMBER_NUM IN (SELECT SDR_NUMBER_NUM FROM M70_SDR_TRANSIT);
DELETE FROM M73_SDR_PRODUCT_MAKE_MODEL
WHERE SDR_NUMBER_NUM IN (SELECT SDR_NUMBER_NUM FROM M70_SDR_TRANSIT);
DELETE FROM M72_SDR
WHERE SDR_NUMBER_NUM IN (SELECT SDR_NUMBER_NUM FROM M70_SDR_TRANSIT);
COMMIT ;
Add Comment