IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='CONCILIACAO_CARTOES_FINAL_CONTROLE') 
BEGIN

	CREATE TABLE [dbo].[CONCILIACAO_CARTOES_FINAL_CONTROLE](
		[CD_CONCILIACAO_CARTOES_FINAL_CONTROLE] [bigint] IDENTITY(1,1) NOT NULL,
		[OPERACAO] VARCHAR(200),
		[CD_CTR] [bigint] NOT NULL,
		[CD_EMP] [int] NOT NULL,
		[CD_FILIAL] [int] NOT NULL,
		[CD_CX] [int] NOT NULL,
		[NR_ECF] [int] NOT NULL,
		[DT_VD] [datetime] NOT NULL,
		[VLR_VENDA] [money] NULL,
		[COD_SIT] [int] NULL,
		[IDT_REDE] [int] NULL,
		[DESCR_REDE] [varchar](50) NULL,
		[IDT_PRODUTO] [decimal](5, 0) NULL,
		[DESCR_PRODUTO] [varchar](50) NULL,
		[DESCR_TRN] [decimal](5, 0) NULL,
		[IDT_BANDEIRA] [decimal](4, 0) NULL,
		[DESCR_BANDEIRA] [varchar](50) NULL,
		[NUM_PARCELAS] [int] NULL,
		[CODIGO_RESP] [varchar](3) NULL,
		[ESTADO_TRN] [decimal](3, 0) NULL,
		[DATA_LANC] [varchar](8) NULL,
		[DATAFISCAL] [varchar](8) NULL,
		[COD_AUTORIZ] [varchar](150) NULL,
		[ST_VENDA] [int] NOT NULL,
		[NSU_SITEF] [varchar](20) NULL,
		[TP_OP_AUTOMATICO] [int] NULL,
		[CD_CTR_PDV_VD_TEF] [bigint] NULL,
		[CD_VD] [bigint] NULL,
		[IDT_TRANSACAO] [bigint] NULL,
		[CD_CTR_CONCILIADOR] [bigint] NULL,
		[CD_RECTO_TEF] [int] NULL,
		[CD_CTR_PDV_CUPOM_NAO_FISCAL_TEF] [int] NULL,
		[CD_CTR_ID_QR_LINX] [int] NULL,
	 CONSTRAINT [PK_CONCILIACAO_CARTOES_FINAL_CONTROLE] PRIMARY KEY CLUSTERED 
	(
		[CD_CONCILIACAO_CARTOES_FINAL_CONTROLE] 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
