CREATE TABLE VS4TBOQMB
	(
	TBQBTBOQNo nvarchar(30) NOT NULL,
	TBQBLn int NOT NULL,
	TBQBType smallint NULL,
	TBQBPriority int NULL,
	TBQBTDwgCode nvarchar(30) NULL,
	TBQBTPdtCode nvarchar(30) NULL,
	TBQBProductName nvarchar(150) NULL,
	TBQBCustom1 nvarchar(30) NULL,
	TBQBCustom2 nvarchar(30) NULL,
	TBQBCustom3 nvarchar(30) NULL,
	TBQBCustom4 nvarchar(30) NULL,
	TBQBCustom5 nvarchar(30) NULL,
	TBQBShippingMark nvarchar(255) NULL,
	TBQBUnitFactor float(53) NULL,
	TBQBQuantityCalc float(53) NULL,
	TBQBUnitCalc smallint NULL,
	TBQBAcceptError nvarchar(30) NULL,
	TBQBQuantity float(53) NULL,
	TBQBStockOnHand float(53) NULL,
	TBQBUseStock float(53) NULL,
	TBQBUseOrder float(53) NULL,
	TBQBTUntCode nvarchar(50) NULL,
	TBQBQuantity2 float(53) NULL,
	TBQBStockOnHand2 float(53) NULL,
	TBQBUseStock2 float(53) NULL,
	TBQBUseOrder2 float(53) NULL,
	TBQBTUntCode2 nvarchar(50) NULL,
	TBQBQuantity3 float(53) NULL,
	TBQBStockOnHand3 float(53) NULL,
	TBQBUseStock3 float(53) NULL,
	TBQBUseOrder3 float(53) NULL,
	TBQBTUntCode3 nvarchar(50) NULL,
	TBQBDescription nvarchar(255) NULL,
	TBQBProcessStatus smallint NULL,
	TBQBTotalRequest float(53) NULL,
	TBQBTotalRequest2 float(53) NULL,
	TBQBTotalRequest3 float(53) NULL,
	TBQBTotalArrear float(53) NULL,
	TBQBTotalArrear2 float(53) NULL,
	TBQBTotalArrear3 float(53) NULL,
	TBQBFinishPCOrder real NULL,
	TBQBFinishPC real NULL,
	TBQBFinishQT float(53) NULL,
	TBQBFinishQT2 float(53) NULL,
	TBQBFinishQT3 float(53) NULL,
	TBQBTotalLoss float(53) NULL,
	TBQBTotalLoss2 float(53) NULL,
	TBQBTotalLoss3 float(53) NULL,
	TBQBStandardDM money NULL,
	TBQBStandardDL money NULL,
	TBQBStandardMOH money NULL,
	TBQBStandardTotal money NULL,
	TBQBStandardUnit money NULL,
	TBQBActualDM money NULL,
	TBQBActualDL money NULL,
	TBQBActualMOH money NULL,
	TBQBActualTotal money NULL,
	TBQBActualUnit money NULL,
	TBQBActualLastDate datetime NULL,
	TBQBEstimateDM money NULL,
	TBQBEstimateDL money NULL,
	TBQBEstimateMOH money NULL,
	TBQBEstimateTotal money NULL,
	TBQBEstimateUnit money NULL,
	TBQBCustomText1 nvarchar(255) NULL,
	TBQBCustomText2 nvarchar(255) NULL,
	TBQBCustomText3 nvarchar(255) NULL,
	TBQBCustomText4 nvarchar(255) NULL,
	TBQBCustomText5 nvarchar(255) NULL,
	TBQBCustomText6 nvarchar(255) NULL,
	TBQBCustomText7 nvarchar(255) NULL,
	TBQBCustomText8 nvarchar(255) NULL,
	TBQBCustomText9 nvarchar(255) NULL,
	TBQBCustomText10 nvarchar(255) NULL,
	TBQBCustomValue1 float(53) NULL,
	TBQBCustomValue2 float(53) NULL,
	TBQBCustomValue3 float(53) NULL,
	TBQBCustomValue4 float(53) NULL,
	TBQBCustomValue5 float(53) NULL,
	TBQBUseDate nvarchar(4) NULL,
	TBQBSetMode smallint NULL,
	TBQBSourceNo nvarchar(30) NULL,
	TBQBSourceLn int NULL,
	TBQBStartDate datetime NULL,
	TBQBSourceDate datetime NULL,
	TBQBTMDMTMDNNo nvarchar(30) NULL,
	TBQBTMDMLn int NULL,
	TBQBTWRMCode nvarchar(255) NULL,
	TBQBFlag1 smallint NULL,
	TBQBFlag2 smallint NULL,
	TBQBFlag3 smallint NULL
	)  ON [PRIMARY]
GO
ALTER TABLE VS4TBOQMB ADD CONSTRAINT
	PK_VS4TBOQMB PRIMARY KEY CLUSTERED 
	(
	TBQBTBOQNo,
	TBQBLn
	) ON [PRIMARY]

GO
