Modelo de dados
GO
/****** Object: Table [dbo].[DQUAD_LEGADO] Script Date: 10/22/2012 17:22:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DQUAD_LEGADO]( [CD_LEGADO] [numeric](2, 0) NOT NULL, [DS_LEGADO] [varchar](50) NOT NULL,
PRIMARY KEY CLUSTERED
(
[CD_LEGADO] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[DQUAD_ERRO_LOTE_ARQUIVO_IMPRESSAO] Script Date: 10/22/2012 17:22:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DQUAD_ERRO_LOTE_ARQUIVO_IMPRESSAO]( [CD_ERRO] [numeric](2, 0) NOT NULL, [DS_MSG_ERRO] [varchar](500) NOT NULL,
PRIMARY KEY CLUSTERED
(
[CD_ERRO] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[DQUAD_ERRO_LOTE_ARQUIVO] Script Date: 10/22/2012 17:22:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DQUAD_ERRO_LOTE_ARQUIVO]( [CD_ERRO] [numeric](2, 0) NOT NULL, [DS_MSG_ERRO] [varchar](500) NOT NULL,
PRIMARY KEY CLUSTERED
(
[CD_ERRO] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[DQUAD_EMPRESA] Script Date: 10/22/2012 17:22:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DQUAD_EMPRESA]( [CD_EMPRESA] [numeric](3, 0) NOT NULL, [DS_EMPRESA] [varchar](50) NOT NULL, [NR_CNPJ] [numeric](15, 0) NOT NULL,
PRIMARY KEY CLUSTERED
(
[CD_EMPRESA] ASC
)WITH (PAD_INDEX