CREATE TABLE VS4TRental
	(
	TRenNo nvarchar(30) NOT NULL,
	TRenTSBkCode nvarchar(30) NULL,
	TRenTRCACode nvarchar(30) NULL,
	TRenMode smallint NULL,
	TRenCode nvarchar(30) NULL,
	TRenType smallint NULL,
	TRenDate datetime NULL,
	TRenime datetime NULL,
	TRenLoadingDate datetime NULL,
	TRenStartAgingDate datetime NULL,
	TRenDueDate datetime NULL,
	TRenRefNo nvarchar(30) NULL,
	TRenRefDate datetime NULL,
	TRenBODeposit int NULL,
	TRenTAssCode nvarchar(30) NULL,
	TRenTPOSCode nvarchar(30) NULL,
	TRenTPrjCode nvarchar(30) NULL,
	TRenReserveForm datetime NULL,
	TRenReserveTo datetime NULL,
	TRenCheckInForm datetime NULL,
	TRenCheckInTo datetime NULL,
	TRenCheckOut datetime NULL,
	TRenActiveStatus smallint NULL,
	TRenTBraCode nvarchar(30) NULL,
	TRenTEmpCode nvarchar(30) NULL,
	TRenSaleName nvarchar(140) NULL,
	TRenGuideText nvarchar(100) NULL,
	TRenEmpText nvarchar(100) NULL,
	TRenDeliveryDate datetime NULL,
	TRenDeliveryTime datetime NULL,
	TRenDeliveryTo nvarchar(255) NULL,
	TRenTOTNLn int NULL,
	TRenTAPNCode nvarchar(30) NULL,
	TRenTARNCode nvarchar(30) NULL,
	TRenTARDCode nvarchar(30) NULL,
	TRenContactNote nvarchar(50) NULL,
	TRenContactName nvarchar(160) NULL,
	TRenCustomerName nvarchar(200) NULL,
	TRenCusAddress nvarchar(255) NULL,
	TRenConsignee nvarchar(255) NULL,
	TRenNotifyParty nvarchar(255) NULL,
	TRenCostTotal money NULL,
	TRenPMCostTotal money NULL,
	TRenPriceChannel smallint NULL,
	TRenDiscountList money NULL,
	TRenSubTotal money NULL,
	TRenDiscountText nvarchar(30) NULL,
	TRenDiscountTotal money NULL,
	TRenNetTotal money NULL,
	TRenDepositText nvarchar(30) NULL,
	TRenDeposit money NULL,
	TRenTotal money NULL,
	TRenTotalFOB money NULL,
	TRenTCurCode nvarchar(5) NULL,
	TRenExchangeRate money NULL,
	TRenTotalInRate money NULL,
	TRenVATType smallint NULL,
	TRenVATRate real NULL,
	TRenTaxBase money NULL,
	TRenVATTotal money NULL,
	TRenGrandTotal money NULL,
	TRenNOTAXTotal money NULL,
	TRenWTAXBase money NULL,
	TRenWTaxRate real NULL,
	TRenWTaxTotal money NULL,
	TRenNetPayment money NULL,
	TRenArrears money NULL,
	TRenAdjustTotal money NULL,
	TRenRewardTotal money NULL,
	TRenPremiumTotal money NULL,
	TRenCommissionBase money NULL,
	TRenCommissionRate nvarchar(30) NULL,
	TRenCommission money NULL,
	TRenBaseIncoType nvarchar(3) NULL,
	TRenIncoType nvarchar(3) NULL,
	TRenIncoterms nvarchar(50) NULL,
	TRenOtherFee money NULL,
	TRenTransportFee money NULL,
	TRenHandlingFee money NULL,
	TRenFreightFee money NULL,
	TRenInsurance money NULL,
	TRenTransportDesc money NULL,
	TRenDuty money NULL,
	TRenShipBy nvarchar(255) NULL,
	TRenCountryOrigin nvarchar(50) NULL,
	TRenDestination nvarchar(255) NULL,
	TRenCondition nvarchar(100) NULL,
	TRenConditionDay smallint NULL,
	TRenCondition1 real NULL,
	TRenConditionDay1 smallint NULL,
	TRenPaymentNote nvarchar(200) NULL,
	TRenStatementNote nvarchar(200) NULL,
	TRenDeliveryNote nvarchar(200) NULL,
	TRenPackingNote nvarchar(200) NULL,
	TRenNote nvarchar(255) NULL,
	TRenDescription nvarchar(255) NULL,
	TRenDayAvailable smallint NULL,
	TRenCustom1 nvarchar(30) NULL,
	TRenCustom2 nvarchar(30) NULL,
	TRenCustom3 nvarchar(30) NULL,
	TRenCustom4 nvarchar(255) NULL,
	TRenCustom5 nvarchar(255) NULL,
	TRenVerifyStatus smallint NULL,
	TRenStartDate datetime NULL,
	TRenFinishDate datetime NULL,
	TRenTSOTCode nvarchar(50) NULL,
	TRenInvoiceStatus smallint NULL,
	TRenDeliveryStatus smallint NULL,
	TRenCreateBy nvarchar(140) NULL,
	TRenCreateDate datetime NULL,
	TRenEditCode nvarchar(30) NULL,
	TRenEditBy nvarchar(140) NULL,
	TRenEditDate datetime NULL,
	TRenConfirmStatus smallint NULL,
	TRenConfirmBy nvarchar(140) NULL,
	TRenConfirmDate datetime NULL,
	TRenApproveStatus smallint NULL,
	TRenApproveBy nvarchar(140) NULL,
	TRenApproveDate datetime NULL,
	TRenApproveNote nvarchar(80) NULL,
	TRenRevision smallint NULL,
	TRenReviseBy nvarchar(140) NULL,
	TRenCancelStatus smallint NULL,
	TRenCancelBy nvarchar(140) NULL,
	TRenCancelDate datetime NULL,
	TRenCancelNote nvarchar(80) NULL,
	TRenFlag1 smallint NULL,
	TRenFlag2 smallint NULL,
	TRenFlag3 datetime NULL
	)  ON [PRIMARY]
GO
ALTER TABLE VS4TRental ADD CONSTRAINT
	PK_VS4TRental PRIMARY KEY CLUSTERED 
	(
	TRenNo
	) ON [PRIMARY]

GO

