SQL-041: Load auditor by AD user and vendor; fallback by vendor¶
Used by mdlAuditor.LoadAuditor to resolve the premium auditor for a given AD user and vendor. First attempts a match by both AD user ID and vendor number; if no result is found, falls back to matching by vendor number alone.
-- Primary: match by user ID and vendor numberSELECTpa_auditor_idFROMpa_auditorWHEREuser_id=:UserIDANDvendor_num=:VendorNum;-- Fallback: match by vendor number onlySELECTpa_auditor_idFROMpa_auditorWHEREvendor_num=:VendorNum
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.