tblChanges for detailed field-level audit; vessel triggers use tblAnnotationLogGeneralspGetUserSettings, used by all OW* triggers that need annotation contextIF NOT EXISTS (SELECT * FROM TRIGGER_DISABLE) guard; deletes always fireTRIGGER_DISABLE_OWIN and TRIGGER_DISABLE before proceedingvwABSD_OWXR_EDM (EDM-sourced ownership view) instead of ABSD_OWXR directly for NATY2 cascade and vessel ownership checks*_UPDATES / *_DELETES staging table that downstream processes (APS, Shipwatch, EDM feeds) consume.
GROUP_OWGE must be one of: A (Actual), B (Beneficial), D (Disponent), G (Group), I (ISM), M (Manager), O (Operator), P (Parent), R (Registered), S (Ship Manager), T (Technical), X (Address) — or NULLTITLE1 (salutation) must be NULL or one of: Mr, Mrs, Ms, Miss, Dr, Prof, Capt, Rev, Sir, Lady, LordvwABSD_OWXR_EDM (EDM Dec 2025) rather than ABSD_OWXR directlyMR_IND_n field (Maritec Reference indicators) must be Y, N, or NULLNATY2 (nationality) changes, the trigger cascades the new nationality to all ownership relationship records for this companyvwABSD_OWXR_EDM (EDM Dec 2025) to identify related recordsABSD_OWXR.NATY2 for all matching OWCODE rowsvalOwnerRelationship — validates that the owner relationship type is valid for the specific contextvalOwnerRelationshipAny — validates relationship type against the full permitted setOWGE_UPDATES (replace-if-exists pattern)tblChanges entries for changed fields with old and new valuesspGetUserSettingsOwners to get initiating user contextIF NOT EXISTS (SELECT * FROM TRIGGER_DISABLE) guard. Deletes always fire the trigger regardless of the disable flag state.OWNDEL_UPDATES staging table for downstream processingOWNA_Update resolves the best address record for this OWCODE to propagate into ABSD_OWIN. The fallback priority order is:
OWAD1 record with ADDTYPE='H' (head office) and SEQNOA='00'ADDTYPE='H' record (any SEQNOA)ADDTYPE='B' (branch), SEQNOA='00'ADDTYPE='B' recordADDTYPE='M' (mailing), SEQNOA='00'ADDTYPE='M' recordABSD_OWIN fields ADDTYP and SEQNOAD. This keeps the published internet record pointing to the most appropriate address even when OWNA itself changes.ABSD_OWIN with the resolved best-address pointers and the updated name fieldsABSD_PERSONNEL.FULL_NAME where OWCODE matchesABSD_OWNER_SEARCH index record with the new name for search performanceOWNA_UPDATES staging tableADDTYPE must be one of: H (Head Office), B (Branch), M (Mailing), R (Registered), T (Trading) — or NULLSEQNOA must be a two-digit zero-padded sequence: '00', '01', …, '99'CON_IND must be Y, N, or NULLY, marks this address as the primary contact address for the ownerCOCODE (correspondence code) is supplied it must be a valid existing OWCODE in ABSD_OWGEspCreateCORelationship is called to register the correspondence relationshipRFB (Registered For Business), POBOX (P.O. Box number), and STREETNO have maximum length constraints enforcedSTREETNO must be numeric if suppliedPOBOX and STREETNO are mutually exclusive on the same address record — having both raises an errorPOSTCODE is supplied and the address has a recognised country code, the trigger looks up tblPostcodeValidation for a regex pattern matching that countrytblPostcodeValidation are accepted without postcode format checkingCOUNTRY, TOWN, and STREET existed in their respective ABSD_ codebook tablestblChanges with: OWCODE, field name, old value, new value, user, dateCOCODE, calls spDeleteCORelationship to remove the correspondence relationshiptblChangesABSD_OWIN.LSTCHNGE (last-changed timestamp) for the matching OWCODE — keeps the internet record freshness date current whenever a secondary address changesOWAD2_UPDATES staging table (replace-if-exists by OWCODE+ADDTYPE+SEQNOA key)OWAN_UPDATES staging tableOWCA_UPDATES staging table, keyed by OWCODE + SHLRNO + INNOTEXT_GRP changes, writes an entry to tblChanges with old/new text group valuestblChanges with the deleted note's OWCODE and TEXT_GRP for audit trailTYPE must be one of: T (Telephone), X (Telex), F (Fax), C (Cable), E (Email), W (Web/URL)TYPE='T' (Phone): CNUM may contain digits, spaces, hyphens, parentheses, and leading +TYPE='X' (Telex): CNUM must be numericTYPE='F' (Fax): same rules as telephoneTYPE='E' (Email): must contain @ and a dot after the @TYPE='W' (Web): must begin with http:// or https:// or www.ABSD_OWAD1 record (head office, ADDTYPE='H', SEQNOA='00') is updated to mirror the valueABSD_OWAD1 contact fields in sync with the OWCO master contact listTYPE='T' → OWAD1.PHONE; TYPE='X' → OWAD1.TELEX; TYPE='F' → OWAD1.FAX; TYPE='C' → OWAD1.CABLEOWCO_UPDATES staging tabletblChanges entry for the CNUM field with old and new valuesABSD_OWAD1 (e.g., last phone deleted → OWAD1.PHONE = NULL)tblChangesHSEQNO='00' designates the current (most recent) document record for this document typetblChanges with OWCODE, field name, old value, new value, user, datetblChanges with the document reference fields captured from deletedinserted, validates them, then executes an explicit DELETE + INSERT on ABSD_OWIN. This means standard INSERT/UPDATE paths never write directly to the table.TRIGGER_DISABLE_OWIN and TRIGGER_DISABLE. Either table having a row disables the full INSTEAD OF logic. When both guards are absent, the full validation + replace executes.ADDTYP must match an existing OWAD1.ADDTYPE for this OWCODESEQNOAD must match an existing OWAD1.SEQNOA for the given ADDTYP+OWCODESEQNOD (document sequence) must reference a valid OWDC record for this OWCODE when suppliedPUBIND (publication indicator) must be Y, N, or NULLCONIND (confidential indicator) must be Y, N, or NULLPUBIND='Y' and CONIND='Y' simultaneously is not permitted — a record cannot be both published and confidentialDELETE FROM ABSD_OWIN WHERE OWCODE = @owcodeINSERT INTO ABSD_OWIN (...) SELECT ... FROM inserted with validated valuesOWIN_UPDATES staging tableUTIL_OWIN_UPDATE audit log table with before/after state, user, and timestampOWNC_UPDATES staging table, keyed by OWCODE + SHLRNOREL1_1 (first relationship party) is NULL but REL1_2 (second relationship party) is NOT NULL, the trigger shifts the values — sets REL1_1 = REL1_2 and REL1_2 = NULLtblChanges is written twice — once from the owning company's perspective and once from the owned company's perspectiveOWSH_DELETES staging tabletblChanges entries from both relationship parties' perspectives: "DO relationship deleted"Called via stored procedure from OWGE and OWXR triggers. The algorithm rebuilds five fleet count buckets:
OWST_UPDATES staging table for downstream processingOWCODE must exist in ABSD_OWGE — company must be registered before a vessel relationship can be createdFXCODE (fleet index code) must exist in the relevant codebook when suppliedBO (Beneficial Owner)NATY2 (nationality) from ABSD_OWGE to the OWXR record itselfvwABSD_OWXR_EDM (EDM Dec 2025) to identify related records for the cascadePUBLIND (publication indicator) must be Y, N, or NULLvalOwnerRelationship stored procedureABSD_PERSONNEL.JOB_POSITION for this OWCODE where the person's role matches the relationship typetblChanges from the vessel's perspective (LRNO key) and from the company's perspective (OWCODE key)spGetUserSettingsOwners contextABSD_PERSONNEL job position recordOWXR_DELETES staging tabletblChanges entries from both the vessel and company perspectives: "Ownership relationship deleted: [role] [LRNO]"| Trigger | Event | Guard | Pattern | Key Downstream |
|---|---|---|---|---|
ABSD_OWGE_Update |
U/I | Standard | Cursor; validation; cascade | OWGE_UPDATES, vwABSD_OWXR_EDM (EDM Dec 2025), OWST rebuild, tblChanges |
OWGE_Delete |
D | None | Simple staging | OWNDEL_UPDATES |
ABSD_OWNA_Update |
U/I | Standard | Cursor; 7-step best address; cascade | OWNA_UPDATES, ABSD_OWIN, ABSD_PERSONNEL, ABSD_OWNER_SEARCH |
ABSD_OWAD1_Update |
U/I | Standard | Cursor; field validation; postcode regex | tblChanges; COUNTRY/TOWN/STREET FKs disabled Feb 2026 |
ABSD_OWAD1_Delete |
D | Standard | Cursor; CO relationship cleanup | spDeleteCORelationship, tblChanges |
ABSD_OWAD2_Update |
U/I | Standard | Simple staging + OWIN touch | OWAD2_UPDATES, ABSD_OWIN.LSTCHNGE |
OWAN_Update |
U/I | Standard | Simple staging | OWAN_UPDATES |
ABSD_OWCA_Update |
U/I | Standard | Staging keyed OWCODE+SHLRNO+INNO | OWCA_UPDATES |
OWCN_UPDATE |
U/I | None | Cursor; tblChanges; secondary annotation on U only | tblChanges |
OWCN_DELETE |
D | None | tblChanges "Note deleted" | tblChanges |
ABSD_OWCO_Update |
U/I | Standard | TYPE+CNUM validation; OWAD1 sync | OWCO_UPDATES, ABSD_OWAD1 comms fields, tblChanges |
OWCODelete |
D | None | Last-record null-out OWAD1 | ABSD_OWAD1 comms fields, tblChanges |
ABSD_OWDC_Update |
U/I | Standard | Cursor; SEQNO='00' current rule | tblChanges |
ABSD_OWDC_DELETE |
D | Standard | Cursor; "DOC Deleted" | tblChanges |
OWIN_Update |
INSTEAD OF U/I | TRIGGER_DISABLE_OWIN + TRIGGER_DISABLE | Validate → DELETE + INSERT full replace | OWIN_UPDATES, UTIL_OWIN_UPDATE |
ABSD_OWNC_Update |
U/I | Standard | Simple staging | OWNC_UPDATES |
OWNER_EXCEPTION_UPDATE |
U/I | Standard | Duplicate OWCODE prevention | – |
ABSD_OWSH_Update |
U/I | Standard | DO uniqueness; null-shift; tblChanges x2 | tblChanges (both perspectives) |
OWSH_Delete |
D | None | Staging + tblChanges x2 | OWSH_DELETES, tblChanges |
ABSD_OWST_Update |
U/I | Standard | Staging only; rebuild called externally | OWST_UPDATES |
OWXR_Update |
U/I | Standard | Cursor; full FK+role validation; cascade | vwABSD_OWXR_EDM, OWST rebuild, PERSONNEL, tblChanges x2 |
OWXR_Delete |
D | None | DO check; PERSONNEL cleanup; tblChanges x2 | OWXR_DELETES, ABSD_PERSONNEL, tblChanges |