CREATE TABLE VS4TInventPeriod
	(
	TIvPTACPTACYID int NOT NULL,
	TIvPTACPID int NOT NULL,
	TIvPTBraCode nvarchar(30) NOT NULL,
	TIvPStartDate datetime NULL,
	TIvPEndDate datetime NULL,
	TIvPFinishGoods money NULL,
	TIvPWorkInProcess money NULL,
	TIvPLawMaterials money NULL,
	TIvPStationery money NULL,
	TIvPFactorySupply money NULL,
	TIvPStockType smallint NULL,
	TIvPStatus smallint NULL,
	TIvPTGLTNo nvarchar(30) NULL,
	TIvPAccountStatus smallint NULL,
	TIvPCustomText1 nvarchar(100) NULL,
	TIvPCustomText2 nvarchar(100) NULL,
	TIvPCustomValue1 money NULL,
	TIvPCustomValue2 money NULL,
	TIvPFlag1 smallint NULL,
	TIvPFlag2 smallint NULL,
	TIvPFlag3 smallint NULL
	)  ON [PRIMARY]
GO
ALTER TABLE VS4TInventPeriod ADD CONSTRAINT
	TIvPTACPTACYID PRIMARY KEY CLUSTERED 
	(
	TIvPTACPTACYID,
	TIvPTACPID,
	TIvPTBraCode
	) ON [PRIMARY]

GO
CREATE NONCLUSTERED INDEX PrimaryKey ON VS4TInventPeriod
	(
	TIvPTACPTACYID,
	TIvPTACPID,
	TIvPTBraCode
	) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX TACPID ON VS4TInventPeriod
	(
	TIvPTACPTACYID
	) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX TACPNo ON VS4TInventPeriod
	(
	TIvPTACPID
	) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX TIvPTACPID ON VS4TInventPeriod
	(
	TIvPTBraCode
	) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX VS4TAccountPeriodVS4TInventPeriod ON VS4TInventPeriod
	(
	TIvPTACPTACYID,
	TIvPTACPID
	) ON [PRIMARY]
GO
