IF OBJECT_ID('EST_PROD_PRECO_PESQ_MERC_IC_IT') IS NULL 
	BEGIN
		CREATE TABLE [dbo].[EST_PROD_PRECO_PESQ_MERC_IC_IT](
			[CD_EMP] [int] NOT NULL,
			[CD_PESQ] [int] NOT NULL,
			[CD_IT] [int] NOT NULL,
			[DS_IT] [nvarchar](50) NULL,
			[PESO] [money] NULL,
			[META] [money] NULL,
			[REALIZADO] [money] NULL,
			[PONTOS] [money] NULL,
			[META_PONTOS] [money] NULL,
			[META_ATINGIDA] [money] NULL,
			[TP_ABSOLUTO] [int] NULL,
			[SIGLA_IT] [nvarchar](10) NULL,
		 CONSTRAINT [PK_EST_PROD_PRECO_PESQ_MERC_IC_IT] PRIMARY KEY CLUSTERED 
		(
			[CD_EMP] ASC,
			[CD_PESQ] ASC,
			[CD_IT] ASC
		)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
		) ON [PRIMARY]


		ALTER TABLE [dbo].[EST_PROD_PRECO_PESQ_MERC_IC_IT]  WITH CHECK ADD  CONSTRAINT [FK_EST_PROD_PRECO_PESQ_MERC_IC_IT_EST_PROD_PRECO_PESQ_MERC] FOREIGN KEY([CD_EMP], [CD_PESQ])
		REFERENCES [dbo].[EST_PROD_PRECO_PESQ_MERC] ([CD_EMP], [CD_PESQ])
		ON UPDATE CASCADE
		ON DELETE CASCADE
		

		ALTER TABLE [dbo].[EST_PROD_PRECO_PESQ_MERC_IC_IT] CHECK CONSTRAINT [FK_EST_PROD_PRECO_PESQ_MERC_IC_IT_EST_PROD_PRECO_PESQ_MERC]
		
	END

