CREATE TABLE Val_Tarjetas_Lotes_Items_Inc(
	Id_Tar_Lote		INT NOT NULL,
	Item			INT NOT NULL,
	Id_Trans		INT NOT NULL,
	Id_Trans_Inc	INT NOT NULL,
	Importe			DECIMAL(12, 2)
	CONSTRAINT PK_TARLINC PRIMARY KEY CLUSTERED (Id_Tar_Lote ,	Item,	Id_Trans, Id_Trans_Inc)
) 
GO

CREATE INDEX IX_TARLInc_Cbtes ON Val_Tarjetas_Lotes_Items_Inc (Id_Trans)
GO

ALTER TABLE Val_Tarjetas_Lotes_Items_Inc  ADD  CONSTRAINT FK_TARLII_Cbtes FOREIGN KEY(Id_Trans)
REFERENCES Cbtes (Id_Trans)
GO

CREATE INDEX IX_TARLInc_Cbtes_Inc ON Val_Tarjetas_Lotes_Items_Inc (Id_Trans_Inc)
GO

ALTER TABLE Val_Tarjetas_Lotes_Items_Inc  ADD  CONSTRAINT FK_TARLII_Cbtes_Inc FOREIGN KEY(Id_Trans_Inc)
REFERENCES Cbtes (Id_Trans)
GO


