CREATE TABLE AR_Customer(
ARDivisionNo VARCHAR(2) NULL,
CustomerNo VARCHAR(20) NULL,
CustomerName VARCHAR(50) NULL,
AddressLine1 VARCHAR(40) NULL,
AddressLine2 VARCHAR(40) NULL,
AddressLine3 VARCHAR(40) NULL,
City VARCHAR(30) NULL,
State VARCHAR(2) NULL,
ZipCode VARCHAR(10) NULL,
CountryCode VARCHAR(3) NULL,
TelephoneNo VARCHAR(20) NULL,
TelephoneExt VARCHAR(6) NULL,
TelephoneType VARCHAR(1) NULL,
FaxNo VARCHAR(20) NULL,
EmailAddress VARCHAR(250) NULL,
URLAddress VARCHAR(50) NULL,
EBMEnabled VARCHAR(1) NULL,
EBMConsumerUserID VARCHAR(15) NULL,
BatchFax VARCHAR(1) NULL,
DefaultCreditCardPmtType VARCHAR(5) NULL,
ContactCode VARCHAR(10) NULL,
ShipMethod VARCHAR(15) NULL,
TaxSchedule VARCHAR(9) NULL,
TaxExemptNo VARCHAR(15) NULL,
TermsCode VARCHAR(2) NULL,
SalespersonDivisionNo VARCHAR(2) NULL,
SalespersonNo VARCHAR(4) NULL,
SalespersonDivisionNo2 VARCHAR(2) NULL,
SalespersonNo2 VARCHAR(4) NULL,
SalespersonDivisionNo3 VARCHAR(2) NULL,
SalespersonNo3 VARCHAR(4) NULL,
SalespersonDivisionNo4 VARCHAR(2) NULL,
SalespersonNo4 VARCHAR(4) NULL,
SalespersonDivisionNo5 VARCHAR(2) NULL,
SalespersonNo5 VARCHAR(4) NULL,
Comment VARCHAR(30) NULL,
SortField VARCHAR(10) NULL,
TemporaryCustomer VARCHAR(1) NULL,
CustomerStatus VARCHAR(1) NULL,
InactiveReasonCode VARCHAR(5) NULL,
OpenItemCustomer VARCHAR(1) NULL,
ResidentialAddress VARCHAR(1) NULL,
StatementCycle VARCHAR(1) NULL,
PrintDunningMessage VARCHAR(1) NULL,
UseSageCloudForInvPrinting VARCHAR(1) NULL,
CustomerType VARCHAR(4) NULL,
PriceLevel VARCHAR(1) NULL,
DateLastActivity DATE NULL,
DateLastPayment DATE NULL,
DateLastStatement DATE NULL,
DateLastFinanceChrg DATE NULL,
DateLastAging DATE NULL,
DefaultItemCode VARCHAR(30) NULL,
DefaultCostCode VARCHAR(9) NULL,
DefaultCostType VARCHAR(1) NULL,
CreditHold VARCHAR(1) NULL,
PrimaryShipToCode VARCHAR(4) NULL,
DateEstablished DATE NULL,
CreditCardGUID VARCHAR(32) NULL,
DefaultPaymentType VARCHAR(5) NULL,
EInvoicePayments VARCHAR(1) NULL,
EInvoiceContactId VARCHAR(24) NULL,
EmailStatements VARCHAR(1) NULL,
PIIEncryptedDate DATE NULL,
NumberOfInvToUseInCalc DECIMAL(2,0) NULL,
AvgDaysPaymentInvoice DECIMAL(3,0) NULL,
AvgDaysOverDue DECIMAL(3,0) NULL,
CustomerDiscountRate DECIMAL(12,3) NULL,
ServiceChargeRate DECIMAL(12,3) NULL,
CreditLimit DECIMAL(13,2) NULL,
LastPaymentAmt DECIMAL(13,2) NULL,
HighestStmntBalance DECIMAL(13,2) NULL,
UnpaidServiceChrg DECIMAL(13,2) NULL,
BalanceForward DECIMAL(13,2) NULL,
CurrentBalance DECIMAL(13,2) NULL,
AgingCategory1 DECIMAL(13,2) NULL,
AgingCategory2 DECIMAL(13,2) NULL,
AgingCategory3 DECIMAL(13,2) NULL,
AgingCategory4 DECIMAL(13,2) NULL,
OpenOrderAmt DECIMAL(13,2) NULL,
RetentionCurrent DECIMAL(13,2) NULL,
RetentionAging1 DECIMAL(13,2) NULL,
RetentionAging2 DECIMAL(13,2) NULL,
RetentionAging3 DECIMAL(13,2) NULL,
RetentionAging4 DECIMAL(13,2) NULL,
SplitCommRate2 DECIMAL(8,3) NULL,
SplitCommRate3 DECIMAL(8,3) NULL,
SplitCommRate4 DECIMAL(8,3) NULL,
SplitCommRate5 DECIMAL(8,3) NULL,
EncryptedVals NULL,
DateCreated DATE NULL,
TimeCreated VARCHAR(8) NULL,
UserCreatedKey VARCHAR(10) NULL,
DateUpdated DATE NULL,
TimeUpdated VARCHAR(8) NULL,
UserUpdatedKey VARCHAR(10) NULL)