Un-Cancel a Cancelled Registration

This one happens quite often.  A user accidentally cancels a registration and now you have to un-cancel it.  A sys admin can un-cancel it using the system utility, providing it’s the last transaction that was done against that mark and aircraft.  If it wasn’t, then you have to do it.

1 – Logon as Admin    

2 – Click the System ICON

3 – Click System Utilities

4 – Attempt to Un-cancel the Registration.  If it works, you will get the following message:

You’re done.

If it doesn’t work, you will receive this error (a user has performed a subsequent transaction against that mark or aircraft).  In this case, you will have to do it with sql (Below)

SQL Steps to Un-Cancel a registration (We are using ‘GSPB’ as an example MARK in these SQL statements)

Step 1 - Find the mark historic in the reverse order that it was done.
The First transaction does not have an X operation (cancel registration). It's probably a U (Update Aircraft) operation. (If there is more than one transaction since the X operation, discuss this with user.)

SELECT *
FROM CARS_AUTH_AC_HISTORY
WHERE MARK IN ('GSPB')
ORDER BY HISTORY_DATE DESC;

Step 2 - Check MARK registration. Compare AUTHORIZATION_ID, If it is not same then it is registered with another aircraft, you have issues (contact the user because you will not be able to un-cancel this registration).

SELECT * FROM cars_canadian_marks WHERE mark IN ('GSPB');

Step 3 - Check AUTHORIZATION and Un-cancel it with correct STATUS (You can ask the SYSTEM ADMIN)

SELECT *
FROM CARS_AUTHORIZATION
WHERE MARK IN ('GSPB');

To Check STATUS CODES use this SQL

SELECT *
FROM CARS_CT_AUTH_STATUS_CODES
WHERE AUTH_STATUS_LANGUAGE = 'E';