CREATE TABLE VS4TBOQ
	(
	TBOQNo nvarchar(30) NOT NULL,
	TBOQCode nvarchar(30) NULL,
	TBOQTJBkCode nvarchar(30) NULL,
	TBOQType smallint NULL,
	TBOQDate datetime NULL,
	TBOQRefNo nvarchar(30) NULL,
	TBOQRefDate datetime NULL,
	TBOQRefLn int NULL,
	TBOQRefNo2 nvarchar(30) NULL,
	TBOQRefDate2 datetime NULL,
	TBOQTInvNo nvarchar(30) NULL,
	TBOQOriginalNo nvarchar(30) NULL,
	TBOQTARNCode nvarchar(30) NULL,
	TBOQCustomerName nvarchar(200) NULL,
	TBOQTPrjCode nvarchar(30) NULL,
	TBOQTSecCode nvarchar(30) NULL,
	TBOQTDepCode nvarchar(30) NULL,
	TBOQTDivCode nvarchar(30) NULL,
	TBOQTBraCode nvarchar(30) NULL,
	TBOQFinishDate datetime NULL,
	TBOQFinishTime datetime NULL,
	TBOQDescription nvarchar(255) NULL,
	TBOQSetMode smallint NULL,
	TBOQTotalRequest float(53) NULL,
	TBOQTotalRequest2 float(53) NULL,
	TBOQTotalRequest3 float(53) NULL,
	TBOQTotalArrear float(53) NULL,
	TBOQTotalArrear2 float(53) NULL,
	TBOQTotalArrear3 float(53) NULL,
	TBOQTotalFinishPCB real NULL,
	TBOQTotalFinishPCO real NULL,
	TBOQTotalFinishPC real NULL,
	TBOQTotalFinishQT float(53) NULL,
	TBOQTotalFinishQT2 float(53) NULL,
	TBOQTotalFinishQT3 float(53) NULL,
	TBOQTotalLoss float(53) NULL,
	TBOQTotalLoss2 float(53) NULL,
	TBOQTotalLoss3 float(53) NULL,
	TBOQStandardTotal money NULL,
	TBOQActualTotal money NULL,
	TBOQActualLastDate smalldatetime NULL,
	TBOQEstimateTotal money NULL,
	TBOQCustomText1 nvarchar(100) NULL,
	TBOQCustomText2 nvarchar(100) NULL,
	TBOQCustomValue1 float(53) NULL,
	TBOQCustomValue2 float(53) NULL,
	TBOQRequestCode nvarchar(30) NULL,
	TBOQRequestBy nvarchar(140) NULL,
	TBOQCloseStatus smallint NULL,
	TBOQCloseBy nvarchar(140) NULL,
	TBOQCloseDate datetime NULL,
	TBOQCloseNote nvarchar(80) NULL,
	TBOQCreateCode nvarchar(30) NULL,
	TBOQCreateBy nvarchar(140) NULL,
	TBOQCreateDate datetime NULL,
	TBOQEditCode nvarchar(30) NULL,
	TBOQEditBy nvarchar(140) NULL,
	TBOQEditDate datetime NULL,
	TBOQConfirmStatus smallint NULL,
	TBOQConfirmBy nvarchar(140) NULL,
	TBOQConfirmDate datetime NULL,
	TBOQApproveStatus smallint NULL,
	TBOQApproveBy nvarchar(140) NULL,
	TBOQApproveDate datetime NULL,
	TBOQApproveNote nvarchar(80) NULL,
	TBOQRevision smallint NULL,
	TBOQCancelStatus smallint NULL,
	TBOQCancelNo nvarchar(30) NULL,
	TBOQCancelBy nvarchar(140) NULL,
	TBOQCancelDate datetime NULL,
	TBOQCancelNote nvarchar(80) NULL,
	TBOQFlag1 smallint NULL,
	TBOQFlag2 smallint NULL,
	TBOQFlag3 smallint NULL
	)  ON [PRIMARY]
GO
ALTER TABLE VS4TBOQ ADD CONSTRAINT
	PK_VS4TBOQ PRIMARY KEY CLUSTERED 
	(
	TBOQNo
	) ON [PRIMARY]

GO
