IF  NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PDV_OUTROS_DOCUMENTOS]') AND type in (N'U')) 
begin

CREATE TABLE [dbo].[PDV_OUTROS_DOCUMENTOS](
	[CD_EMP] [int] NOT NULL,
	[CD_FILIAL] [int] NOT NULL,
	[CD_CX] [int] NOT NULL,
	[CD_CTR] [int] NOT NULL,
	[CONT_ORDEM_OPERACAO] [int] NOT NULL,
	[CONT_GERAL_N_FISC] [int] NOT NULL,
	[CONT_GERAL_REL_GERENCIAL] [int] NOT NULL,
	[CONT_COMPR_DEB_CRED] [int] NOT NULL,
	[DENOMINACAO_DOC_FISCAL] [varchar](50) NOT NULL,
	[DT_FINAL_EMIS] [datetime] NULL,
	[HR_EMIS] [datetime] NULL,
	[NR_SERIE_IMP] [varchar](40) NULL,
	[ALT_SIST] [int] NULL,
	[REG_ALTERADO] [int] NULL,
 CONSTRAINT [PK_PDV_OUTROS_DOCUMENTOS] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_FILIAL] ASC,
	[CD_CX] ASC,
	[CD_CTR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]


END
