IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[CONCILIACAO_CARTOES_LINX_CONCILIADOR_LOTE]') AND TYPE IN (N'U'))
BEGIN

	CREATE TABLE CONCILIACAO_CARTOES_LINX_CONCILIADOR_LOTE (
		IDT_LOTE				INT NOT NULL,
		CD_EMP					INT NOT NULL,
		CD_FILIAL				INT NOT NULL,
		TPT_REGISTRO			INT NOT NULL,
		CD_GRUPO				INT NULL,
		CD_TERMINAL				INT NULL,
		LOTE					VARCHAR(40) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL,
		DT_LOTE					DATE NULL,
		CD_BANDEIRA				INT NULL,
		CD_TRANSACAO			INT NULL,
		TPT_PARCELAMENTO		INT NULL,
		QTD_REGISTROS_VENDAS	INT NULL,
		VLR_BRUTO				MONEY NULL,
		VLR_LIQUIDO				MONEY NULL,
		NR_PARCELAS				INT NULL,
		ST_STATUS				INT NULL,
		TAXA_ADMINISTRADORA		MONEY NULL,
		IDT_LOTE_SUBSTITUTO		INT NULL,
		CD_BANCO				INT NULL,
		AGENCIA					VARCHAR(20) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL,
		CONTACORRENTE			VARCHAR(20) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL,
		DT_CAD_LOTE datetime DEFAULT getdate() NULL,
		CONSTRAINT PK_CONCILIACAO_CARTOES_LINX_CONCILIADOR_LOTE PRIMARY KEY (IDT_LOTE)
	)  
END
 

  
  