IF  EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL]') AND name = N'PK_dbo.EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL')
ALTER TABLE [dbo].[EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL] DROP CONSTRAINT [PK_dbo.EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL] WITH ( ONLINE = OFF )
GO


IF EXISTS (SELECT 1 FROM SYS.COLUMNS WHERE OBJECT_ID = OBJECT_ID('EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL') )
BEGIN
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL]') AND name = N'PK_EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL')
	ALTER TABLE [dbo].[EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL] ADD  CONSTRAINT [PK_EST_ARV_MD_F_GRP_PARAM_CURVA_PRC_FILIAL] PRIMARY KEY CLUSTERED 
	(
		[CD_EMP] ASC,
		[CD_ARV_PARAM] ASC,
		[CD_FILIAL] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 95) ON [PRIMARY]
END


