Skip to content

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.

Classification

Field Value
SQL ID SQL-041
Operation type Read
Execution method Inline SQL
Database Oracle
Schema [unqualified]**
Command type Text
Business object mdlAuditor
Criteria property Local SQL
Lifecycle method LoadAuditor

Parameters

Parameter Direction Type Max length Description
:UserID Input String 30 AD user ID (primary query).
:VendorNum Input String 9 Vendor number (both queries).

Tables

Table Access Columns used
PA_AUDITOR SELECT PA_AUDITOR_ID, USER_ID, VENDOR_NUM

Sample SQL

-- Primary: match by user ID and vendor number
SELECT pa_auditor_id FROM pa_auditor
WHERE user_id = :UserID AND vendor_num = :VendorNum;

-- Fallback: match by vendor number only
SELECT pa_auditor_id FROM pa_auditor
WHERE vendor_num = :VendorNum

Operations and processes

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.

Sources

  • Business\SAIF.Business.External.Users\mdlAuditor.vb