Sept 2021 : NOTE - all required code for this process is found at :
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.
The documentation on the FAA website regarding codes has not been updated for a decade or so. FAA SDR management is aware of the issue.
...
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
...