CREATE TABLE [C6StagingPeriodico].[W6APTR] (
	[RETE] char(1) NOT NULL,
	[DTTRIM] decimal(9,0) NOT NULL,
	[DTRIFE] decimal(9,0) NOT NULL,
	[CODFIS] varchar(16) NOT NULL,
	[CODMAN] varchar(6) NULL,
	[CODCONF] varchar(11) NOT NULL,
	[CONTO] varchar(12) NOT NULL,
	[RUBR] varchar(3) NOT NULL,
	[CUSTGAR] varchar(1) NOT NULL,
	[TIPPROD] varchar(5) NOT NULL,
	[CODPROD] varchar(2) NULL,
	[CTV_PREC] decimal(15,2) NULL,
	[CTV_ATT] decimal(15,2) NULL,
	[APPORTI] decimal(15,2) NULL,
	[PRELIEVI] decimal(15,2) NULL
)
ALTER TABLE [C6StagingPeriodico].[W6APTR] ADD CONSTRAINT [PK_W6APTR] PRIMARY KEY CLUSTERED ([RETE],[DTTRIM],[DTRIFE],[CODFIS],[CODCONF],[CONTO],[RUBR],[CUSTGAR],[TIPPROD])
GO