STEP 25 ACTION TAKEN CODES

Sept 2021 : NOTE - all required code for this process is found at :

FAA DATA IMPORT PROCEDURE.TXT

simply copy and place into your preferred SQL tool


 

 

 

 

/*

Action Taken (aka Precautionary Procedure) #1 is mandatory - TC uses the same Action taken codes as the FAA ( mostly ) . Action_taken 2,3,4 are optional

*/

 

UPDATE M70_SDR_TRANSIT SET ACTION_TAKEN_CD_1 = 'K'  WHERE NVL(ACTION_TAKEN_CD_1,' ') = ' ' ;

UPDATE M70_SDR_TRANSIT SET ACTION_TAKEN_CD_2 = NULL WHERE ACTION_TAKEN_CD_2 = ' ' ;

UPDATE M70_SDR_TRANSIT SET ACTION_TAKEN_CD_3 = NULL WHERE ACTION_TAKEN_CD_3 = ' ' ;

UPDATE M70_SDR_TRANSIT SET ACTION_TAKEN_CD_4 = NULL WHERE ACTION_TAKEN_CD_4 = ' ' ;

COMMIT ;

 

SELECT DISTINCT(M70.ACTION_TAKEN_CD_1) FROM   M70_SDR_TRANSIT M70 WHERE  NOT EXISTS

(SELECT TR95.ACTION_TAKEN_CD FROM TR95_ACTION_TAKEN TR95)

UNION

SELECT DISTINCT(M70.ACTION_TAKEN_CD_2) FROM   M70_SDR_TRANSIT M70 WHERE  NOT EXISTS

(SELECT TR95.ACTION_TAKEN_CD FROM TR95_ACTION_TAKEN TR95) 

UNION

SELECT DISTINCT(M70.ACTION_TAKEN_CD_3) FROM   M70_SDR_TRANSIT M70 WHERE  NOT EXISTS

(SELECT TR95.ACTION_TAKEN_CD FROM TR95_ACTION_TAKEN TR95) 

UNION

SELECT DISTINCT(M70.ACTION_TAKEN_CD_4) FROM   M70_SDR_TRANSIT M70 WHERE  NOT EXISTS

(SELECT TR95.ACTION_TAKEN_CD FROM TR95_ACTION_TAKEN TR95) ;