Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

Nature code #1 is mandatory and is converted thru the first series of statements below. "O" - other is the default if the code still comes up invalid or Null.

...

SET    NATURE_CD_2  =  'O'

WHERE  TRIM(NATURE_CD_2)

       NOT IN ( SELECT NATURE_CD FROM TR98_NATURE );

...

SET    NATURE_CD_3  =  'O'

WHERE  TRIM(NATURE_CD_3)

       NOT IN ( SELECT NATURE_CD FROM TR98_NATURE );

...

UPDATE M70_SDR_TRANSIT SET NATURE_CD_2 = NULL WHERE SUBSTR(NATURE_CD_2,1,1) = ' ' ;

UPDATE M70_SDR_TRANSIT SET NATURE_CD_3 = NULL WHERE SUBSTR(NATURE_CD_3,1,1) = ' ' ;

commit;

--- DOUBLE CHECK FOR INVALID NATURE CODES 

...