Skip to content

SQL-008: Insert COMPANY for clsCustomer

This statement supports clsCustomer by executing a create operation against COMPANY.

Classification

Field Value
SQL ID SQL-008
Operation type Create
Execution method Inline
Database Oracle
Schema [unqualified]**
Command type Text
Business object clsCustomer
Criteria property InsertSQL
Lifecycle method BeforeInsert

Parameters

Parameter Direction Type Max length Description
:CustomerName Input String 100 Customer display name
:CustomerTypeCode Input String 5 Customer type code
:EffectiveDate Input Date N/A Effective date
:ExpirationDate Input Date N/A Expiration date
:IsActive Input String (Y/N) 1 Active flag
:IsPrimary Input String (Y/N) 1 Primary flag
:IsPerson Input String (Y/N) 1 Person/company flag
:CustomerShortDescription Input Unknown 10 Short customer description
:TaxID Input Decimal 11 Federal tax identifier
:ContactName Input String 80 Customer contact name
:InternalReferenceID Input Decimal 100 Internal reference identifier
:ExternalReferenceID Input Decimal 100 External reference identifier
:NoteText Input String 100 Free-form note text
:CustomerID Input Decimal N/A Customer primary key
:UpdateDate Input Date N/A Audit update timestamp
:UpdateUser Input Date 30 Audit update user

Tables

Table Access Columns used
COMPANY INSERT ACTIVE_FLAG, COMPANY_CODE, COMPANY_NAME, COMPANY_SEQ_NUM, COMPANY_SHORT_DESCR, CONTACT_NAME, EFF_DT, EXP_DT, EXTERNAL_REFERENCE_ID, INTERNAL_REFERENCE_ID, NOTE_TEXT, PERSON_FLAG, PRIMARY_FLAG, TAX_ID, UPDATE_DATE, UPDATE_USER

Sample SQL

Insert into COMPANY ( COMPANY_SEQ_NUM, COMPANY_NAME, EFF_DT, EXP_DT, COMPANY_SHORT_DESCR, TAX_ID, CONTACT_NAME, COMPANY_CODE, ACTIVE_FLAG, PRIMARY_FLAG, PERSON_FLAG, INTERNAL_REFERENCE_ID, EXTERNAL_REFERENCE_ID, NOTE_TEXT, UPDATE_DATE, UPDATE_USER ) Values ( :CustomerID, :CustomerName, :EffectiveDate, :ExpirationDate, :CustomerShortDescription, :TaxID, :ContactName, :CustomerTypeCode, :IsActive, :IsPrimary, :IsPerson, :InternalReferenceID, :ExternalReferenceID, :NoteText, :UpdateDate, :UpdateUser)

Operations and processes

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Business\SAIF.Business.CustomerContact\Customer\clsCustomer.vb