STEP 26 WHEN_DISCOVERED and HOW_DISCOVERED
Sept 2021 : NOTE - all required code for this process is found at :
simply copy and place into your preferred SQL tool
/*
Set defaults on WHEN_DISCOVERED_CODE (aka Stage of Operation) and HOW_DISCOVERED_CODE
*/
UPDATE M70_SDR_TRANSIT SET WHEN_DISCOVERED_CODE = 'IN'
WHERE NVL(WHEN_DISCOVERED_CODE,'1')
NOT IN (SELECT WHEN_DISCOVERED_CD FROM TR94_DISCOVERED_WHEN);
COMMIT;
UPDATE M70_SDR_TRANSIT SET HOW_DISCOVERED_CODE = 'O'
WHERE NVL(HOW_DISCOVERED_CODE,'1')
NOT IN (SELECT HOW_DISCOVERED_CD FROM TR92_DISCOVERED_HOW) ;
COMMIT;
/*