Versions Compared

Key

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

...

Y02_AIRCRAFT_HISTORY Y02
WHERE Y53.AIRCRAFT_PARTY_LIST_ID = C07.AIRCRAFT_ID
AND Y02.AIRCRAFT_ID = C07.AIRCRAFT_ID
AND Y02.RUN_ID = 99
AND Y53.DATE_STOP_DTE IS NULL
AND C07.AIRCRAFT_ID IN (SELECT AIRCRAFT_ID FROM Y93_CCARCS_PREVIOUS_DAY WHERE MARK IN ( 'XXXX')) /* WHERE XXXX IS THE DESIRED AIRCRAFT TAIL MARK */
AND C07.INSPECTION_TYPE_CD = 2

/* WE ONLY REPAIR TYPE 2. TYPE 1 IS TC INSPECTION - AND IS FIXABLE ONSCREEN */
ORDER BY Y02.AIRCRAFT_MARK_ID, C07.DATE_INSPECT_DTE DESC ;

...

DELETE FROM C07_INSPECTION

WHERE AIRCRAFT_ID = XXXXXXIN (SELECT AIRCRAFT_ID FROM Y93_CCARCS_PREVIOUS_DAY WHERE MARK IN ( 'XXXX'))

AND TO_CHAR(DATE_INSPECT_DTE,'YYYY-MM-DD') = 'XXXX-XX-DD';

...