---
title: Update Pa Audit Data
summary: SQL-076
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Audit.Premium
reference_type: package
---

# SQL-076: Update Pa Audit Data

This statement supports the premium-audit library by update Pa Audit Data.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-076 |
| **Operation type** | Update |
| **Execution method** | IDataRequest.SQLStatement (CommandType.Text) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsAudit` |
| **Criteria property** | `UpdateSQL` |
| **Lifecycle method** | `BeforeUpdate / AfterUpdate` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:AuditOfficeCode` | Input | bound from `m_AuditOfficeCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2539) |
| `:EndDate` | Input | bound from `EndDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2540) |
| `:AuditorID` | Input | bound from `AuditorID` | 10 | Bound in `clsAudit.BeforeUpdate` (line 2541) |
| `:ReasonCode` | Input | bound from `AuditReasonCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2542) |
| `:SelectionCategoryGroupCode` | Input | bound from `SelectionCategoryGroupCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2543) |
| `:TypeCode` | Input | bound from `PremiumAuditTypeCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2544) |
| `:PolicyNum` | Input | bound from `PolicyNumber` | — | Bound in `clsAudit.BeforeUpdate` (line 2545) |
| `:StartDate` | Input | bound from `StartDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2546) |
| `:AppealHearingDate` | Input | bound from `m_AppealHearingDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2547) |
| `:AppealNoticeDate` | Input | bound from `m_AppealNoticeDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2548) |
| `:AppealRequestDate` | Input | bound from `m_AppealRequestDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2549) |
| `:AppointmentDate` | Input | bound from `combinedDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2552) |
| `:AppointmentLocationSeqNum` | Input | bound from `m_AppointmentLocationSeqNum` | — | Bound in `clsAudit.BeforeUpdate` (line 2554) |
| `:AssignmentDate` | Input | bound from `m_AssignmentDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2555) |
| `:AuditHoursCount` | Input | bound from `m_AuditHoursCount` | — | Bound in `clsAudit.BeforeUpdate` (line 2556) |
| `:AuditHours` | Input | bound from `m_AuditHours` | — | Bound in `clsAudit.BeforeUpdate` (line 2557) |
| `:AuditMethodCode` | Input | bound from `m_AuditMethodCode` | — | Bound in `clsAudit.BeforeUpdate` (line 2558) |
| `:TravelHours` | Input | bound from `m_TravelHours` | — | Bound in `clsAudit.BeforeUpdate` (line 2559) |
| `:MiscHours` | Input | bound from `m_MiscHours` | — | Bound in `clsAudit.BeforeUpdate` (line 2560) |
| `:FollowupDate` | Input | bound from `m_FollowupDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2561) |
| `:AuditInstructionsText` | Input | bound from `m_AuditInstructionsText` | 4000 | Bound in `clsAudit.BeforeUpdate` (line 2562) |
| `:CancelDate` | Input | bound from `m_CancelDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2563) |
| `:CompletedDate` | Input | bound from `m_CompletedDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2564) |
| `:DisputedAmount` | Input | bound from `m_DisputedAmount` | — | Bound in `clsAudit.BeforeUpdate` (line 2565) |
| `:DueDate` | Input | bound from `m_DueDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2566) |
| `:ProgramDueDate` | Input | bound from `m_ProgramDueDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2567) |
| `:CancelReasonCode` | Input | bound from `m_CancelReasonCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2568) |
| `:ReviewStatusCode` | Input | bound from `m_ReviewStatusCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2569) |
| `:RevisesSeqNum` | Input | bound from `m_RevisesSeqNum` | — | Bound in `clsAudit.BeforeUpdate` (line 2570) |
| `:TestAuditAppealCode` | Input | bound from `m_TestAuditAppealCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2571) |
| `:TestAuditResponseCode` | Input | bound from `m_TestAuditResponseCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2572) |
| `:TestAuditResultCode` | Input | bound from `m_TestAuditResultCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2573) |
| `:TestAuditTypeCode` | Input | bound from `m_TestAuditTypeCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2574) |
| `:WaiverReasonCode` | Input | bound from `m_WaiverReasonCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2575) |
| `:ReviewDate` | Input | bound from `m_ReviewDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2576) |
| `:SchedulingInProgressFlag` | Input | bound from `m_SchedulingInProgressFlag` | 1 | Bound in `clsAudit.BeforeUpdate` (line 2577) |
| `:SelectionStdPremAmount` | Input | bound from `m_SelectionStdPremAmount` | — | Bound in `clsAudit.BeforeUpdate` (line 2578) |
| `:SubmittedDate` | Input | bound from `m_SubmittedDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2579) |
| `:TestAuditorName` | Input | bound from `m_TestAuditorName` | 30 | Bound in `clsAudit.BeforeUpdate` (line 2580) |
| `:TestAuditDifferenceAmount` | Input | bound from `m_TestAuditDifferenceAmount` | — | Bound in `clsAudit.BeforeUpdate` (line 2581) |
| `:UpdateDate` | Input | bound from `m_UpdateDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2582) |
| `:UpdateUser` | Input | bound from `m_UpdateUser` | 30 | Bound in `clsAudit.BeforeUpdate` (line 2583) |
| `:WaiverEndDate` | Input | bound from `m_WaiverEndDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2584) |
| `:WaiverStartDate` | Input | bound from `m_WaiverStartDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2585) |
| `:WarningLetterDate` | Input | bound from `m_WarningLetterDate` | — | Bound in `clsAudit.BeforeUpdate` (line 2586) |
| `:AssignmentWeightCount` | Input | bound from `AssignmentWeightCount` | — | Bound in `clsAudit.BeforeUpdate` (line 2587) |
| `:WorkbookStatusCode` | Input | bound from `SmartWorkbookStatusCode(m_WorkbookStatus` | — | Bound in `clsAudit.BeforeUpdate` (line 2589) |
| `:WorkbookFileName` | Input | bound from `m_workbookFileName` | 65 | Bound in `clsAudit.BeforeUpdate` (line 2590) |
| `:WorkbookImageSeqNum` | Input | bound from `m_workbookImageSeqNum` | — | Bound in `clsAudit.BeforeUpdate` (line 2591) |
| `:StatusCode` | Input | bound from `StatusCode` | 5 | Bound in `clsAudit.BeforeUpdate` (line 2588) |
| `:AuditSeqNum` | Input | bound from `m_AuditSeqNum` | — | Bound in `clsAudit.BeforeUpdate` (line 2592) |
| `:UpdateSeqNum` | Input | bound from `UpdateSeqNum` | — | Bound in `clsAudit.BeforeUpdate` (line 2593) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [`PA_AUDIT`](../database-tables.md#pa_audit) | UPDATE | See sample SQL. |

## Sample SQL

```sql
UPDATE
  PA_AUDIT
SET
  AUDIT_OFFICE_CODE = :AuditOfficeCode,
  END_DATE = :EndDate,
  PA_AUDITOR_ID = :AuditorID,
  PA_REASON_CODE = :ReasonCode,
  PA_SLCTN_CATEGORY_GROUP_CODE = :SelectionCategoryGroupCode,
  PA_TYPE_CODE = :TypeCode,
  POLICY_NUM = :PolicyNum,
  START_DATE = :StartDate,
  APPEAL_HEARING_DATE = :AppealHearingDate,
  APPEAL_NOTICE_DATE = :AppealNoticeDate,
  APPEAL_REQUEST_DATE = :AppealRequestDate,
  APPOINTMENT_DATE = :AppointmentDate,
  APPOINTMENT_LOC_SEQ_NUM = :AppointmentLocationSeqNum,
  ASSIGNMENT_DATE = :AssignmentDate,
  AUDIT_HOURS_COUNT = :AuditHoursCount,
  AUDIT_HOURS = :AuditHours,
  PA_METHOD_CODE = :AuditMethodCode,
  TRAVEL_HOURS = :TravelHours,
  MISC_HOURS = :MiscHours,
  FOLLOWUP_DATE = :FollowupDate,
  AUDIT_INSTRUCTIONS_TEXT = :AuditInstructionsText,
  CANCEL_DATE = :CancelDate,
  COMPLETED_DATE = :CompletedDate,
  DISPUTED_AMOUNT = :DisputedAmount,
  DUE_DATE = :DueDate,
  PROGRAM_DUE_DATE = :ProgramDueDate,
  PA_CANCEL_REASON_CODE = :CancelReasonCode,
  PA_REVIEW_STATUS_CODE = :ReviewStatusCode,
  PA_REVISES_SEQ_NUM = :RevisesSeqNum,
  PA_TEST_AUDIT_APPEAL_CODE = :TestAuditAppealCode,
  PA_TEST_AUDIT_RESPONSE_CODE = :TestAuditResponseCode,
  PA_TEST_AUDIT_RESULT_CODE = :TestAuditResultCode,
  PA_TEST_AUDIT_TYPE_CODE = :TestAuditTypeCode,
  PA_WAIVER_REASON_CODE = :WaiverReasonCode,
  REVIEW_DATE = :ReviewDate,
  SCHEDULING_INPROGRESS_FLAG = :SchedulingInProgressFlag,
  SELECTION_STD_PREM_AMOUNT = :SelectionStdPremAmount,
  SUBMITTED_DATE = :SubmittedDate,
  TEST_AUDITOR_NAME = :TestAuditorName,
  TEST_AUDIT_DIFFERENCE_AMOUNT = :TestAuditDifferenceAmount,
  UPDATE_DATE = :UpdateDate,
  UPDATE_USER = :UpdateUser,
  WAIVER_END_DATE = :WaiverEndDate,
  WAIVER_START_DATE = :WaiverStartDate,
  WARNING_LETTER_DATE = :WarningLetterDate,
  ASSIGNMENT_WEIGHT_COUNT = :AssignmentWeightCount,
  WORKBOOK_STATUS_CODE = :WorkbookStatusCode,
  WORKBOOK_FILE_NAME = :WorkbookFileName,
  WORKBOOK_IMAGE_SEQ_NUM = :WorkbookImageSeqNum,
  PA_STATUS_CODE = :StatusCode,
  UPDATE_SEQ_NUM = UPDATE_SEQ_NUM + 1
WHERE
  PA_AUDIT_SEQ_NUM = :AuditSeqNum
  AND UPDATE_SEQ_NUM = :UpdateSeqNum
```

## Operations and processes
- [Assign an audit to an auditor](../operations/assign-an-audit-to-an-auditor.md)
- [Synchronize an audit with WCIS policy-period changes](../operations/synchronize-an-audit-with-wcis-policy-period-changes.md)
- [Save a premium audit](../operations/save-a-premium-audit.md)
- [Audit lifecycle status transitions](../operations/audit-lifecycle-status-transitions.md)

## Business rules
- [BR-020](../business-rules.md#br-020-ineligible-policy-types-cannot-be-audited)
- [BR-021](../business-rules.md#br-021-duplicate-audits-are-blocked)
- [BR-032](../business-rules.md#br-032-rows-affected-must-equal-one)
- [BR-035](../business-rules.md#br-035-nonzerodecimalrequired-auditseqnum)
- [BR-036](../business-rules.md#br-036-nonzerodecimalrequired-policynumber)
- [BR-037](../business-rules.md#br-037-textrequired)
- [BR-057](../business-rules.md#br-057-validupdatableaudit)



> **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.Policy.Audit.Premium/clsAudit.vb:4921`
