if object_id('PDV_CONSLD_VD_CUPOM_PENDENCIA')  is null 
BEGIN
CREATE TABLE [dbo].[PDV_CONSLD_VD_CUPOM_PENDENCIA](
	[CD_CTR] [int] IDENTITY(1,1) NOT NULL,
	[CD_EMP] [int] NOT NULL,
	[CD_FILIAL] [int] NOT NULL,
	[DT_VD] [datetime] NOT NULL,
	[NR_ECF] [int] NOT NULL,
	[CD_CX] [int] NOT NULL,
	[CD_USU] [int] NOT NULL,
	[DT_CAD] [datetime] NOT NULL,
	[TP_CUPOM] [int] NOT NULL,
 CONSTRAINT [PK_PDV_CONSLD_VD_CUPOM_PENDENCIA] PRIMARY KEY CLUSTERED 
(
	[CD_CTR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
 CONSTRAINT [IX_PDV_CONSLD_VD_CUPOM_PENDENCIA] UNIQUE NONCLUSTERED 
(
	[NR_ECF] ASC,
	[DT_VD] ASC,
	[CD_CX] ASC,
	[TP_CUPOM] ASC,
	[CD_FILIAL] ASC,
	[CD_EMP] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
END
