IF EXISTS(select 1 from sys.objects where name = 'PK_EST_TRIB_CONF_GRP_CPL')
	ALTER TABLE [dbo].[EST_TRIB_CONF_GRP_CPL] DROP CONSTRAINT [PK_EST_TRIB_CONF_GRP_CPL]
GO
UPDATE
	EST_TRIB_CONF_GRP_CPL
SET 
	CD_OPER_MVA=0
WHERE
	CD_OPER_MVA IS NULL
GO
ALTER TABLE dbo.EST_TRIB_CONF_GRP_CPL ALTER COLUMN CD_OPER_MVA INT NOT NULL;
GO
ALTER TABLE [dbo].[EST_TRIB_CONF_GRP_CPL] ADD  CONSTRAINT [PK_EST_TRIB_CONF_GRP_CPL] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_CTR] ASC,
	[CD_TRIB_CST] ASC,
	[UF] ASC,
	[TP_MOV] ASC,
	[TP_TRANSA] ASC,
	[CD_OPER_MVA] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO


