IF  NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CTB_EXP_MOV]') AND type in (N'U'))
begin
CREATE TABLE [dbo].[CTB_EXP_MOV](
	[CD_LANC] [int] IDENTITY(1,1) NOT NULL,
	[CD_EMP] [int] NULL,
	[CD_FILIAL] [int] NULL,	
	[MOVIMENTO] [varchar](150) NULL,
	[OPERACAO] [varchar](150) NULL,
	[OPERACAO_DEBITO] [varchar](150) NULL,
	[CD_CNT_RED] [int] NULL,
	[CD_CNT] [varchar](20) NULL,
	[CD_CNT_RED_DEBITO] [int] NULL,
	[CD_CNT_DEBITO] [varchar](20) NULL,
	[DT_MOV] [datetime] NULL,
	[HIST] [varchar](300) NULL,
	[VLR_LANC] [money] NULL ,
	[TP_TRANSA] [varchar](3) NULL,
	[RATEIO_CENTRO_CUSTO] [int] NULL,
	[DS_CENTRO_CUSTO] [varchar](150) NULL,
	[CNT_CENTRO_CUSTO] [varchar](20) NULL,
	[VLR_CENTRO_CUSTO] [money] NULL,
	[ORIG_CONTA] [varchar](100) NULL,
	[COD_CONTA] [varchar](50) NULL,
	[NM_PROCEDURE] [varchar](150) NULL, 
	[DT_GERACAO] [datetime] NULL,
 CONSTRAINT [PK_CTB_EXP_MOV] PRIMARY KEY CLUSTERED 
(
	[CD_LANC] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[CTB_EXP_MOV] ADD  DEFAULT ((0)) FOR [CD_CNT_RED]


ALTER TABLE [dbo].[CTB_EXP_MOV] ADD  DEFAULT ((0)) FOR [CD_CNT_RED_DEBITO]


ALTER TABLE [dbo].[CTB_EXP_MOV] ADD  DEFAULT ((0)) FOR [VLR_LANC]


ALTER TABLE [dbo].[CTB_EXP_MOV] ADD  DEFAULT ((0)) FOR [RATEIO_CENTRO_CUSTO]


ALTER TABLE [dbo].[CTB_EXP_MOV] ADD  DEFAULT ((0)) FOR [VLR_CENTRO_CUSTO]

end

