
/****** Object: Table [dbo].[$Vehicle]   Script Date: 02/04/2012 09:43:41 ******/
USE [IN_test];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
CREATE TABLE [dbo].[$Vehicle] (
[timestamp] timestamp NOT NULL,
[VIN] varchar(20) NOT NULL,
[Vehicle Status] int NOT NULL,
[Model] varchar(50) NOT NULL,
[Search Description] varchar(30) NOT NULL,
[Type] varchar(30) NOT NULL,
[Class] varchar(10) NOT NULL,
[Unit of Measure Code] varchar(10) NOT NULL,
[Model No_] varchar(20) NOT NULL,
[Statistics Group] int NOT NULL,
[Unit Price] decimal(38, 20) NOT NULL,
[Price_Profit Calculation] int NOT NULL,
[Profit %] decimal(38, 20) NOT NULL,
[Unit Cost] decimal(38, 20) NOT NULL,
[Standard Cost] decimal(38, 20) NOT NULL,
[Last Direct Cost] decimal(38, 20) NOT NULL,
[Average Cost] decimal(38, 20) NOT NULL,
[Minimum Unit Price] decimal(38, 20) NOT NULL,
[Indirect Cost %] decimal(38, 20) NOT NULL,
[Vendor No_] varchar(20) NOT NULL,
[Vendor Item No_] varchar(20) NOT NULL,
[Lead Time Calculation] varchar(32) NOT NULL,
[Unit List Price] decimal(38, 20) NOT NULL,
[Gross Weight] decimal(38, 20) NOT NULL,
[Net Weight] decimal(38, 20) NOT NULL,
[Tariff No_] varchar(10) NOT NULL,
[Duty Unit Conversion] decimal(38, 20) NOT NULL,
[Country Purchased Code] varchar(10) NOT NULL,
[Blocked] tinyint NOT NULL,
[Last Date Modified] datetime NOT NULL,
[Location Code] varchar(10) NOT NULL,
[Price Includes VAT] tinyint NOT NULL,
[VAT Bus_ Posting Gr_ (Price)] varchar(10) NOT NULL,
[Gen_ Prod_ Posting Group] varchar(10) NOT NULL,
[Picture] image NULL,
[VAT Prod_ Posting Group] varchar(10) NOT NULL,
[Country of Origin Code] varchar(10) NOT NULL,
[No_ Series] varchar(10) NOT NULL,
[Department Code] varchar(10) NOT NULL,
[Make Code] varchar(10) NOT NULL,
[Variant Code] varchar(10) NOT NULL,
[Customer No_] varchar(20) NOT NULL,
[License No_] varchar(13) NOT NULL,
[Mileage] decimal(38, 20) NOT NULL,
[Annual Mileage] decimal(38, 20) NOT NULL,
[Prod_ Year] datetime NOT NULL,
[Initial Registration] datetime NOT NULL,
[No_ of Previous Owners] int NOT NULL,
[Registration Certificate] varchar(8) NOT NULL,
[Data Processing No_] varchar(10) NOT NULL,
[Engine Code] varchar(10) NOT NULL,
[Engine No_] varchar(20) NOT NULL,
[Key No_] varchar(20) NOT NULL,
[Vehicle Category Code] varchar(10) NOT NULL,
[Emissions Test Category Code] varchar(10) NOT NULL,
[Cylinder Capacity (ccm)] decimal(38, 20) NOT NULL,
[Vehicle Type Code] varchar(10) NOT NULL,
[Labor Type] varchar(30) NOT NULL,
[Customer Registration Date] datetime NOT NULL,
[Creation Date] datetime NOT NULL,
[Model Code] varchar(20) NOT NULL,
[Transmission Type Code] varchar(20) NOT NULL,
[Engine Type Code] varchar(20) NOT NULL,
[Market Segment Code] varchar(10) NOT NULL,
[No_ of Cylinders] int NOT NULL,
[Power (kW)] int NOT NULL,
[Power (hp)] int NOT NULL,
[Tires] varchar(15) NOT NULL,
[Empty Weight (kg)] decimal(38, 20) NOT NULL,
[Total Weight (kg)] decimal(38, 20) NOT NULL,
[Roof Load (kg)] decimal(38, 20) NOT NULL,
[Trailer Load (kg)] decimal(38, 20) NOT NULL,
[Trailer Tongue Load (kg)] decimal(38, 20) NOT NULL,
[All Land] tinyint NOT NULL,
[No_ of Axles] int NOT NULL,
[Wheel Distance (mm)] decimal(38, 20) NOT NULL,
[Front Axle Load (kg)] int NOT NULL,
[Rear Axle Load (kg)] int NOT NULL,
[Deregistration Date] datetime NOT NULL,
[No_ of Doors] int NOT NULL,
[Dealer Status] varchar(10) NOT NULL,
[Own Sale] tinyint NOT NULL,
[Purchase Date] datetime NOT NULL,
[Neg_ Adjmt_ Date] datetime NOT NULL,
[Current Branch Book No_] varchar(20) NOT NULL,
[Import Vehicle] tinyint NOT NULL,
[Old Vehicle Status] int NOT NULL,
[Old Customer No_] varchar(20) NOT NULL,
[Old Sales Date] datetime NOT NULL,
[Old Own Sale] tinyint NOT NULL,
[Address No_] int NOT NULL,
[Old Book No_] varchar(20) NOT NULL,
[Old Branch Book No_] varchar(20) NOT NULL,
[Purchase Receipt Date] datetime NOT NULL,
[Inventory Posting Group] varchar(10) NOT NULL,
[Text 1] varchar(30) NOT NULL,
[Text 2] varchar(30) NOT NULL,
[Yes_No] tinyint NOT NULL,
[Yes_No 2] tinyint NOT NULL,
[Date 1] datetime NOT NULL,
[Date 2] datetime NOT NULL,
[Extra Code 1] varchar(10) NOT NULL,
[Extra Code 2] varchar(10) NOT NULL,
[Text 3] varchar(30) NOT NULL,
[Text 4] varchar(30) NOT NULL,
[Current Book No_] varchar(20) NOT NULL,
[Gross Profit (LCY)] decimal(38, 20) NOT NULL,
[Gross Profit %] decimal(38, 20) NOT NULL,
[Date of Sale] datetime NOT NULL,
[Current Price Sticker] int NOT NULL,
[Manual Price Calculation] tinyint NOT NULL,
[Labor Charging Code] varchar(10) NOT NULL,
[Schwacke Code] varchar(8) NOT NULL,
[Document No_] varchar(20) NOT NULL,
[Bin Code] varchar(10) NOT NULL,
[Last Time Modified] datetime NOT NULL,
[Fabrication Code] varchar(20) NOT NULL,
[Free Code 1] varchar(20) NOT NULL,
[Free Code 2] varchar(20) NOT NULL,
[Free Decimal 1] decimal(38, 20) NOT NULL,
[Free Decimal 2] decimal(38, 20) NOT NULL,
[Fiscal Power] varchar(10) NOT NULL,
[Vintage] varchar(10) NOT NULL,
[Business No_] varchar(20) NOT NULL,
[Invoice purchase date] datetime NOT NULL,
[Contact No_] varchar(20) NOT NULL,
[Purchase Currency Code] varchar(10) NOT NULL,
[Purchase Currency Factor] decimal(38, 20) NOT NULL,
[Raw material] tinyint NOT NULL,
[intransit_flag] tinyint NOT NULL,
[valider_transit] tinyint NOT NULL,
[Previous Customer Name] varchar(30) NOT NULL,
[Salesman Code] varchar(10) NOT NULL,
[Additional Mileage] decimal(38, 20) NOT NULL,
[Unit Price Duty Free] decimal(38, 20) NOT NULL,
[Code Famille] varchar(20) NOT NULL,
[Transformation Reference] varchar(20) NOT NULL,
[Purch Receipt Date (Realised)] datetime NOT NULL,
[Physical Receipt date] datetime NOT NULL,
[Hours] decimal(38, 20) NOT NULL,
[Aux_ Meter Reading] decimal(38, 20) NOT NULL,
[Recovery Customs System] varchar(20) NOT NULL)
ON [Data Filegroup 1]
TEXTIMAGE_ON [Data Filegroup 1]
WITH (DATA_COMPRESSION = NONE);
GO

/****** Object: Table [dbo].[$Vehicle]   Script Date: 02/04/2012 09:43:41 ******/
USE [IN_test];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
CREATE TABLE [dbo].[$Vehicle] (
[timestamp] timestamp NOT NULL,
[VIN] varchar(20) NOT NULL,
[Vehicle Status] int NOT NULL,
[Model] varchar(50) NOT NULL,
[Search Description] varchar(30) NOT NULL,
[Type] varchar(30) NOT NULL,
[Class] varchar(10) NOT NULL,
[Unit of Measure Code] varchar(10) NOT NULL,
[Model No_] varchar(20) NOT NULL,
[Statistics Group] int NOT NULL,
[Unit Price] decimal(38, 20) NOT NULL,
[Price_Profit Calculation] int NOT NULL,
[Profit %] decimal(38, 20) NOT NULL,
[Unit Cost] decimal(38, 20) NOT NULL,
[Standard Cost] decimal(38, 20) NOT NULL,
[Last Direct Cost] decimal(38, 20) NOT NULL,
[Average Cost] decimal(38, 20) NOT NULL,
[Minimum Unit Price] decimal(38, 20) NOT NULL,
[Indirect Cost %] decimal(38, 20) NOT NULL,
[Vendor No_] varchar(20) NOT NULL,
[Vendor Item No_] varchar(20) NOT NULL,
[Lead Time Calculation] varchar(32) NOT NULL,
[Unit List Price] decimal(38, 20) NOT NULL,
[Gross Weight] decimal(38, 20) NOT NULL,
[Net Weight] decimal(38, 20) NOT NULL,
[Tariff No_] varchar(10) NOT NULL,
[Duty Unit Conversion] decimal(38, 20) NOT NULL,
[Country Purchased Code] varchar(10) NOT NULL,
[Blocked] tinyint NOT NULL,
[Last Date Modified] datetime NOT NULL,
[Location Code] varchar(10) NOT NULL,
[Price Includes VAT] tinyint NOT NULL,
[VAT Bus_ Posting Gr_ (Price)] varchar(10) NOT NULL,
[Gen_ Prod_ Posting Group] varchar(10) NOT NULL,
[Picture] image NULL,
[VAT Prod_ Posting Group] varchar(10) NOT NULL,
[Country of Origin Code] varchar(10) NOT NULL,
[No_ Series] varchar(10) NOT NULL,
[Department Code] varchar(10) NOT NULL,
[Make Code] varchar(10) NOT NULL,
[Variant Code] varchar(10) NOT NULL,
[Customer No_] varchar(20) NOT NULL,
[License No_] varchar(13) NOT NULL,
[Mileage] decimal(38, 20) NOT NULL,
[Annual Mileage] decimal(38, 20) NOT NULL,
[Prod_ Year] datetime NOT NULL,
[Initial Registration] datetime NOT NULL,
[No_ of Previous Owners] int NOT NULL,
[Registration Certificate] varchar(8) NOT NULL,
[Data Processing No_] varchar(10) NOT NULL,
[Engine Code] varchar(10) NOT NULL,
[Engine No_] varchar(20) NOT NULL,
[Key No_] varchar(20) NOT NULL,
[Vehicle Category Code] varchar(10) NOT NULL,
[Emissions Test Category Code] varchar(10) NOT NULL,
[Cylinder Capacity (ccm)] decimal(38, 20) NOT NULL,
[Vehicle Type Code] varchar(10) NOT NULL,
[Labor Type] varchar(30) NOT NULL,
[Customer Registration Date] datetime NOT NULL,
[Creation Date] datetime NOT NULL,
[Model Code] varchar(20) NOT NULL,
[Transmission Type Code] varchar(20) NOT NULL,
[Engine Type Code] varchar(20) NOT NULL,
[Market Segment Code] varchar(10) NOT NULL,
[No_ of Cylinders] int NOT NULL,
[Power (kW)] int NOT NULL,
[Power (hp)] int NOT NULL,
[Tires] varchar(15) NOT NULL,
[Empty Weight (kg)] decimal(38, 20) NOT NULL,
[Total Weight (kg)] decimal(38, 20) NOT NULL,
[Roof Load (kg)] decimal(38, 20) NOT NULL,
[Trailer Load (kg)] decimal(38, 20) NOT NULL,
[Trailer Tongue Load (kg)] decimal(38, 20) NOT NULL,
[All Land] tinyint NOT NULL,
[No_ of Axles] int NOT NULL,
[Wheel Distance (mm)] decimal(38, 20) NOT NULL,
[Front Axle Load (kg)] int NOT NULL,
[Rear Axle Load (kg)] int NOT NULL,
[Deregistration Date] datetime NOT NULL,
[No_ of Doors] int NOT NULL,
[Dealer Status] varchar(10) NOT NULL,
[Own Sale] tinyint NOT NULL,
[Purchase Date] datetime NOT NULL,
[Neg_ Adjmt_ Date] datetime NOT NULL,
[Current Branch Book No_] varchar(20) NOT NULL,
[Import Vehicle] tinyint NOT NULL,
[Old Vehicle Status] int NOT NULL,
[Old Customer No_] varchar(20) NOT NULL,
[Old Sales Date] datetime NOT NULL,
[Old Own Sale] tinyint NOT NULL,
[Address No_] int NOT NULL,
[Old Book No_] varchar(20) NOT NULL,
[Old Branch Book No_] varchar(20) NOT NULL,
[Purchase Receipt Date] datetime NOT NULL,
[Inventory Posting Group] varchar(10) NOT NULL,
[Text 1] varchar(30) NOT NULL,
[Text 2] varchar(30) NOT NULL,
[Yes_No] tinyint NOT NULL,
[Yes_No 2] tinyint NOT NULL,
[Date 1] datetime NOT NULL,
[Date 2] datetime NOT NULL,
[Extra Code 1] varchar(10) NOT NULL,
[Extra Code 2] varchar(10) NOT NULL,
[Text 3] varchar(30) NOT NULL,
[Text 4] varchar(30) NOT NULL,
[Current Book No_] varchar(20) NOT NULL,
[Gross Profit (LCY)] decimal(38, 20) NOT NULL,
[Gross Profit %] decimal(38, 20) NOT NULL,
[Date of Sale] datetime NOT NULL,
[Current Price Sticker] int NOT NULL,
[Manual Price Calculation] tinyint NOT NULL,
[Labor Charging Code] varchar(10) NOT NULL,
[Schwacke Code] varchar(8) NOT NULL,
[Document No_] varchar(20) NOT NULL,
[Bin Code] varchar(10) NOT NULL,
[Last Time Modified] datetime NOT NULL,
[Fabrication Code] varchar(20) NOT NULL,
[Free Code 1] varchar(20) NOT NULL,
[Free Code 2] varchar(20) NOT NULL,
[Free Decimal 1] decimal(38, 20) NOT NULL,
[Free Decimal 2] decimal(38, 20) NOT NULL,
[Fiscal Power] varchar(10) NOT NULL,
[Vintage] varchar(10) NOT NULL,
[Business No_] varchar(20) NOT NULL,
[Invoice purchase date] datetime NOT NULL,
[Contact No_] varchar(20) NOT NULL,
[Purchase Currency Code] varchar(10) NOT NULL,
[Purchase Currency Factor] decimal(38, 20) NOT NULL,
[Raw material] tinyint NOT NULL,
[intransit_flag] tinyint NOT NULL,
[valider_transit] tinyint NOT NULL,
[Previous Customer Name] varchar(30) NOT NULL,
[Salesman Code] varchar(10) NOT NULL,
[Additional Mileage] decimal(38, 20) NOT NULL,
[Unit Price Duty Free] decimal(38, 20) NOT NULL,
[Code Famille] varchar(20) NOT NULL,
[Transformation Reference] varchar(20) NOT NULL,
[Purch Receipt Date (Realised)] datetime NOT NULL,
[Physical Receipt date] datetime NOT NULL,
[Hours] decimal(38, 20) NOT NULL,
[Aux_ Meter Reading] decimal(38, 20) NOT NULL,
[Recovery Customs System] varchar(20) NOT NULL)
ON [Data Filegroup 1]
TEXTIMAGE_ON [Data Filegroup 1]
WITH (DATA_COMPRESSION = NONE);
GO

/****** Object: Table [dbo].[$Sales Invoice Line]   Script Date: 02/04/2012 09:51:42 ******/
USE [IN_test];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
CREATE TABLE [dbo].[$Sales Invoice Line] (
[timestamp] timestamp NOT NULL,
[Document No_] varchar(20) NOT NULL,
[Line No_] int NOT NULL,
[Sell-to Customer No_] varchar(20) NOT NULL,
[Type] int NOT NULL,
[No_] varchar(20) NOT NULL,
[Location Code] varchar(10) NOT NULL,
[Posting Group] varchar(10) NOT NULL,
[Quantity Disc_ Code] varchar(20) NOT NULL,
[Shipment Date] datetime NOT NULL,
[Description] varchar(50) NOT NULL,
[Description 2] varchar(50) NOT NULL,
[Unit of Measure] varchar(10) NOT NULL,
[Quantity] decimal(38, 20) NOT NULL,
[Unit Price] decimal(38, 20) NOT NULL,
[Unit Cost (LCY)] decimal(38, 20) NOT NULL,
[VAT %] decimal(38, 20) NOT NULL,
[Quantity Disc_ %] decimal(38, 20) NOT NULL,
[Line Discount %] decimal(38, 20) NOT NULL,
[Line Discount Amount] decimal(38, 20) NOT NULL,
[Amount] decimal(38, 20) NOT NULL,
[Amount Including VAT] decimal(38, 20) NOT NULL,
[Allow Invoice Disc_] tinyint NOT NULL,
[Gross Weight] decimal(38, 20) NOT NULL,
[Net Weight] decimal(38, 20) NOT NULL,
[Units per Parcel] decimal(38, 20) NOT NULL,
[Unit Volume] decimal(38, 20) NOT NULL,
[Appl_-to Item Entry] int NOT NULL,
[Department Code] varchar(10) NOT NULL,
[Make Code] varchar(10) NOT NULL,
[Price Group Code] varchar(10) NOT NULL,
[Allow Quantity Disc_] tinyint NOT NULL,
[Job No_] varchar(20) NOT NULL,
[Appl_-to Job Entry] int NOT NULL,
[Phase Code] varchar(10) NOT NULL,
[Task Code] varchar(10) NOT NULL,
[Step Code] varchar(10) NOT NULL,
[Job Applies-to ID] varchar(20) NOT NULL,
[Apply and Close (Job)] tinyint NOT NULL,
[Work Type Code] varchar(10) NOT NULL,
[Serial No_] varchar(20) NOT NULL,
[Cust__Item Disc_ %] decimal(38, 20) NOT NULL,
[Inv_ Discount Amount] decimal(38, 20) NOT NULL,
[Drop Shipment] tinyint NOT NULL,
[Gen_ Bus_ Posting Group] varchar(10) NOT NULL,
[Gen_ Prod_ Posting Group] varchar(10) NOT NULL,
[VAT Calculation Type] int NOT NULL,
[Transaction Type] varchar(10) NOT NULL,
[Transport Method] varchar(10) NOT NULL,
[Attached to Line No_] int NOT NULL,
[Exit Point] varchar(10) NOT NULL,
[Area] varchar(10) NOT NULL,
[Transaction Specification] varchar(10) NOT NULL,
[Tax Area Code] varchar(20) NOT NULL,
[Tax Liable] tinyint NOT NULL,
[Tax Group Code] varchar(10) NOT NULL,
[VAT Bus_ Posting Group] varchar(10) NOT NULL,
[VAT Prod_ Posting Group] varchar(10) NOT NULL,
[Blanket Order No_] varchar(20) NOT NULL,
[Blanket Order Line No_] int NOT NULL,
[VAT Base Amount] decimal(38, 20) NOT NULL,
[Unit Cost] decimal(38, 20) NOT NULL,
[Book No_] varchar(20) NOT NULL,
[Variant Code] varchar(10) NOT NULL,
[Bin Code] varchar(10) NOT NULL,
[Qty_ per Unit of Measure] decimal(38, 20) NOT NULL,
[Unit of Measure Code] varchar(10) NOT NULL,
[Quantity (Base)] decimal(38, 20) NOT NULL,
[Vehicle Tax amount] decimal(38, 20) NOT NULL,
[Vehicle tax] tinyint NOT NULL,
[Order No_] varchar(20) NOT NULL,
[Order Line No_] int NOT NULL,
[Posting Date] datetime NOT NULL,
[Branch Book No_] varchar(20) NOT NULL,
[Order Type] int NOT NULL,
[Item Type] int NOT NULL,
[VIN] varchar(20) NOT NULL,
[Vehicle Status] int NOT NULL,
[Registration Date] datetime NOT NULL,
[Mileage] int NOT NULL,
[Expected Shipping Week] datetime NOT NULL,
[License No_] varchar(20) NOT NULL,
[Indentation] int NOT NULL,
[Totaling] varchar(30) NOT NULL,
[Service Order No_] varchar(20) NOT NULL,
[Service Order Line No_] int NOT NULL,
[Labor Make Code] varchar(10) NOT NULL,
[Labor No_] varchar(20) NOT NULL,
[Exch_ Parts Tax Base] decimal(38, 20) NOT NULL,
[Exch_ Parts Tax %] decimal(38, 20) NOT NULL,
[Exch_ Parts Tax Amount] decimal(38, 20) NOT NULL,
[Exch_ Parts VAT %] decimal(38, 20) NOT NULL,
[Allow Discount] tinyint NOT NULL,
[Cockpit Entry No_] int NOT NULL,
[Printed Deposit Tickets] decimal(38, 20) NOT NULL,
[Additional Item] int NOT NULL,
[Customer Group Code] varchar(10) NOT NULL,
[Item Group Code] varchar(10) NOT NULL,
[Quantity Multiplier] decimal(38, 20) NOT NULL,
[Cockpit Posting Entry No_] int NOT NULL,
[Fair Deal] tinyint NOT NULL,
[Automatic Surcharge] tinyint NOT NULL,
[Service Surcharge Code] varchar(10) NOT NULL,
[From Veh_ Opt_Inv_ Doc_ Type] int NOT NULL,
[From Veh_ Option Inv_ Doc_ No_] varchar(20) NOT NULL,
[From Veh_ Opt_Inv_ Doc_ Line] int NOT NULL,
[From Veh_ Opt_Inv_ Line Type] int NOT NULL,
[From Veh_ Option Inv_ No_] varchar(20) NOT NULL,
[From Veh_ Opt_Inv_ IntCode] varchar(10) NOT NULL,
[Sending Required] int NOT NULL,
[Sales Line Document No_] varchar(20) NOT NULL,
[Sales Line Line No_] int NOT NULL,
[Sales Line Document Type] int NOT NULL,
[Main Customer] tinyint NOT NULL,
[Vehicle Unit Price Date] datetime NOT NULL,
[Shelf_Bin No_] varchar(10) NOT NULL,
[Print Option Line] tinyint NOT NULL,
[Print Unit Price] tinyint NOT NULL,
[Veh_ Opt_ Line No_] int NOT NULL,
[Shipment No_ not Closed] varchar(20) NOT NULL,
[Remaining Qty on Shipment] decimal(38, 20) NOT NULL,
[Return Deposit] tinyint NOT NULL,
[Ret_ Dep_ Setteled Qty_] decimal(38, 20) NOT NULL,
[Business No_] varchar(20) NOT NULL,
[Disable for Requisition] tinyint NOT NULL,
[Complement Type] int NOT NULL,
[Print Vehicle Complement] tinyint NOT NULL,
[Include In Provision Calc_] tinyint NOT NULL,
[Service Transfer Posting Group] varchar(10) NOT NULL,
[Department type] int NOT NULL,
[From Date] datetime NOT NULL,
[To Date] datetime NOT NULL,
[Vehicle No_] varchar(20) NOT NULL,
[Vehicle Name1] varchar(50) NOT NULL,
[Vehicle Name2] varchar(50) NOT NULL,
[Service Contract No_] varchar(20) NOT NULL,
[Service Contract Invoice Order] tinyint NOT NULL,
[Taxe System Code] varchar(10) NOT NULL,
[Ordered Qty] decimal(38, 20) NOT NULL)
ON [Data Filegroup 1]
WITH (DATA_COMPRESSION = NONE);
GO

/****** Object: Table [dbo].[$Sales Credit Memo Header]   Script Date: 02/04/2012 09:54:51 ******/
USE [IN_test];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
CREATE TABLE [dbo].[$Sales Credit Memo Header] (
[timestamp] timestamp NOT NULL,
[No_] varchar(20) NOT NULL,
[Sell-to Customer No_] varchar(20) NOT NULL,
[Bill-to Customer No_] varchar(20) NOT NULL,
[Bill-to Name] varchar(30) NOT NULL,
[Bill-to Name 2] varchar(30) NOT NULL,
[Bill-to Address] varchar(30) NOT NULL,
[Bill-to Address 2] varchar(30) NOT NULL,
[Bill-to City] varchar(30) NOT NULL,
[Bill-to Contact] varchar(30) NOT NULL,
[Your Reference] varchar(30) NOT NULL,
[Ship-to Code] varchar(10) NOT NULL,
[Ship-to Name] varchar(30) NOT NULL,
[Ship-to Name 2] varchar(30) NOT NULL,
[Ship-to Address] varchar(30) NOT NULL,
[Ship-to Address 2] varchar(30) NOT NULL,
[Ship-to City] varchar(30) NOT NULL,
[Ship-to Contact] varchar(30) NOT NULL,
[Posting Date] datetime NOT NULL,
[Shipment Date] datetime NOT NULL,
[Posting Description] varchar(50) NOT NULL,
[Payment Terms Code] varchar(10) NOT NULL,
[Due Date] datetime NOT NULL,
[Payment Discount %] decimal(38, 20) NOT NULL,
[Pmt_ Discount Date] datetime NOT NULL,
[Shipment Method Code] varchar(10) NOT NULL,
[Location Code] varchar(10) NOT NULL,
[Department Code] varchar(10) NOT NULL,
[Make Code] varchar(10) NOT NULL,
[Customer Posting Group] varchar(10) NOT NULL,
[Currency Code] varchar(10) NOT NULL,
[Currency Factor] decimal(38, 20) NOT NULL,
[Price Group Code] varchar(10) NOT NULL,
[Prices Including VAT] tinyint NOT NULL,
[Allow Quantity Disc_] tinyint NOT NULL,
[Invoice Disc_ Code] varchar(20) NOT NULL,
[Cust__Item Disc_ Gr_] varchar(10) NOT NULL,
[Language Code] varchar(10) NOT NULL,
[Salesperson Code] varchar(10) NOT NULL,
[No_ Printed] int NOT NULL,
[On Hold] varchar(3) NOT NULL,
[Applies-to Doc_ Type] int NOT NULL,
[Applies-to Doc_ No_] varchar(20) NOT NULL,
[Bal_ Account No_] varchar(20) NOT NULL,
[Job No_] varchar(20) NOT NULL,
[VAT Registration No_] varchar(20) NOT NULL,
[Reason Code] varchar(10) NOT NULL,
[Gen_ Bus_ Posting Group] varchar(10) NOT NULL,
[EU 3-Party Trade] tinyint NOT NULL,
[Transaction Type] varchar(10) NOT NULL,
[Transport Method] varchar(10) NOT NULL,
[VAT Country Code] varchar(10) NOT NULL,
[Sell-to Customer Name] varchar(30) NOT NULL,
[Sell-to Customer Name 2] varchar(30) NOT NULL,
[Sell-to Address] varchar(30) NOT NULL,
[Sell-to Address 2] varchar(30) NOT NULL,
[Sell-to City] varchar(30) NOT NULL,
[Sell-to Contact] varchar(30) NOT NULL,
[Bill-to Post Code] varchar(20) NOT NULL,
[Bill-to County] varchar(30) NOT NULL,
[Bill-to Country Code] varchar(10) NOT NULL,
[Sell-to Post Code] varchar(20) NOT NULL,
[Sell-to County] varchar(30) NOT NULL,
[Sell-to Country Code] varchar(10) NOT NULL,
[Ship-to Post Code] varchar(20) NOT NULL,
[Ship-to County] varchar(30) NOT NULL,
[Ship-to Country Code] varchar(10) NOT NULL,
[Bal_ Account Type] int NOT NULL,
[Exit Point] varchar(10) NOT NULL,
[Correction] tinyint NOT NULL,
[Document Date] datetime NOT NULL,
[External Document No_] varchar(20) NOT NULL,
[Area] varchar(10) NOT NULL,
[Transaction Specification] varchar(10) NOT NULL,
[Payment Method Code] varchar(10) NOT NULL,
[Pre-Assigned No_ Series] varchar(10) NOT NULL,
[No_ Series] varchar(10) NOT NULL,
[Pre-Assigned No_] varchar(20) NOT NULL,
[User ID] varchar(20) NOT NULL,
[Source Code] varchar(10) NOT NULL,
[Tax Area Code] varchar(20) NOT NULL,
[Tax Liable] tinyint NOT NULL,
[VAT Bus_ Posting Group] varchar(10) NOT NULL,
[VAT Base Discount %] decimal(38, 20) NOT NULL,
[Return Order No_] varchar(20) NOT NULL,
[Return Order No_ Series] varchar(10) NOT NULL,
[Stamp Duty] tinyint NOT NULL,
[Stamp Duty Amount] decimal(38, 20) NOT NULL,
[Vehicle Tax] tinyint NOT NULL,
[Vehicle Tax Amount] decimal(38, 20) NOT NULL,
[Order Type] int NOT NULL,
[Customer Confirmation Date] datetime NOT NULL,
[Price Freeze Until] datetime NOT NULL,
[Service Order No_] varchar(20) NOT NULL,
[Item Sales Price Group] varchar(10) NOT NULL,
[Show Discount] tinyint NOT NULL,
[Purch_ Order Type] varchar(10) NOT NULL,
[Inv_ Discount %] decimal(38, 20) NOT NULL,
[Sell-to Salutation Code] varchar(10) NOT NULL,
[Bill-to Salutation Code] varchar(10) NOT NULL,
[Ship-to Addr_ Salutation Code] varchar(10) NOT NULL,
[Vehicle Sales Price Group] varchar(10) NOT NULL,
[Option Sales Price Group] varchar(10) NOT NULL,
[Cockpit Entry No_] int NOT NULL,
[Cockpit Posting Entry No_] int NOT NULL,
[Transfer Method] int NOT NULL,
[First Shipment Date] datetime NOT NULL,
[Last Shipment Date] datetime NOT NULL,
[Main Shipment Date] datetime NOT NULL,
[Branch Code] varchar(10) NOT NULL,
[Vehicle Unit Price Date] datetime NOT NULL,
[ETP Credit Memo] tinyint NOT NULL,
[Cash Payment] tinyint NOT NULL,
[Cash Payment Document Type] int NOT NULL,
[Cash Register Receipt] varchar(20) NOT NULL,
[Header Type] int NOT NULL,
[Customer Class] int NOT NULL,
[Disable for Requisition] tinyint NOT NULL,
[Customer Contact Program] tinyint NOT NULL,
[Mobile Service] tinyint NOT NULL,
[Proposal for Alternative Part] int NOT NULL,
[Service Contract No_] varchar(20) NOT NULL,
[Service Contract Invoice Order] tinyint NOT NULL,
[Type of Document] int NOT NULL,
[Barcode] image NULL,
[Taxe System Code] varchar(10) NOT NULL,
[Exemption No_] varchar(20) NOT NULL)
ON [Data Filegroup 1]
TEXTIMAGE_ON [Data Filegroup 1]
WITH (DATA_COMPRESSION = NONE);
GO

/****** Object: Table [dbo].[$Sales Credit Memo Line]   Script Date: 02/04/2012 09:55:23 ******/
USE [IN_test];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
CREATE TABLE [dbo].[$Sales Credit Memo Line] (
[timestamp] timestamp NOT NULL,
[Document No_] varchar(20) NOT NULL,
[Line No_] int NOT NULL,
[Sell-to Customer No_] varchar(20) NOT NULL,
[Type] int NOT NULL,
[No_] varchar(20) NOT NULL,
[Location Code] varchar(10) NOT NULL,
[Posting Group] varchar(10) NOT NULL,
[Quantity Disc_ Code] varchar(20) NOT NULL,
[Shipment Date] datetime NOT NULL,
[Description] varchar(50) NOT NULL,
[Description 2] varchar(50) NOT NULL,
[Unit of Measure] varchar(10) NOT NULL,
[Quantity] decimal(38, 20) NOT NULL,
[Unit Price] decimal(38, 20) NOT NULL,
[Unit Cost (LCY)] decimal(38, 20) NOT NULL,
[VAT %] decimal(38, 20) NOT NULL,
[Quantity Disc_ %] decimal(38, 20) NOT NULL,
[Line Discount %] decimal(38, 20) NOT NULL,
[Line Discount Amount] decimal(38, 20) NOT NULL,
[Amount] decimal(38, 20) NOT NULL,
[Amount Including VAT] decimal(38, 20) NOT NULL,
[Allow Invoice Disc_] tinyint NOT NULL,
[Gross Weight] decimal(38, 20) NOT NULL,
[Net Weight] decimal(38, 20) NOT NULL,
[Units per Parcel] decimal(38, 20) NOT NULL,
[Unit Volume] decimal(38, 20) NOT NULL,
[Appl_-to Item Entry] int NOT NULL,
[Department Code] varchar(10) NOT NULL,
[Make Code] varchar(10) NOT NULL,
[Price Group Code] varchar(10) NOT NULL,
[Allow Quantity Disc_] tinyint NOT NULL,
[Job No_] varchar(20) NOT NULL,
[Appl_-to Job Entry] int NOT NULL,
[Phase Code] varchar(10) NOT NULL,
[Task Code] varchar(10) NOT NULL,
[Step Code] varchar(10) NOT NULL,
[Job Applies-to ID] varchar(20) NOT NULL,
[Apply and Close (Job)] tinyint NOT NULL,
[Work Type Code] varchar(10) NOT NULL,
[Serial No_] varchar(20) NOT NULL,
[Cust__Item Disc_ %] decimal(38, 20) NOT NULL,
[Inv_ Discount Amount] decimal(38, 20) NOT NULL,
[Gen_ Bus_ Posting Group] varchar(10) NOT NULL,
[Gen_ Prod_ Posting Group] varchar(10) NOT NULL,
[VAT Calculation Type] int NOT NULL,
[Transaction Type] varchar(10) NOT NULL,
[Transport Method] varchar(10) NOT NULL,
[Attached to Line No_] int NOT NULL,
[Exit Point] varchar(10) NOT NULL,
[Area] varchar(10) NOT NULL,
[Transaction Specification] varchar(10) NOT NULL,
[Tax Area Code] varchar(20) NOT NULL,
[Tax Liable] tinyint NOT NULL,
[Tax Group Code] varchar(10) NOT NULL,
[VAT Bus_ Posting Group] varchar(10) NOT NULL,
[VAT Prod_ Posting Group] varchar(10) NOT NULL,
[Blanket Order No_] varchar(20) NOT NULL,
[Blanket Order Line No_] int NOT NULL,
[VAT Base Amount] decimal(38, 20) NOT NULL,
[Unit Cost] decimal(38, 20) NOT NULL,
[Book No_] varchar(20) NOT NULL,
[Variant Code] varchar(10) NOT NULL,
[Bin Code] varchar(10) NOT NULL,
[Qty_ per Unit of Measure] decimal(38, 20) NOT NULL,
[Unit of Measure Code] varchar(10) NOT NULL,
[Quantity (Base)] decimal(38, 20) NOT NULL,
[Appl_-from Item Entry] int NOT NULL,
[Vehicle Tax Amount] decimal(38, 20) NOT NULL,
[Vehicle Tax] tinyint NOT NULL,
[Order No_] varchar(20) NOT NULL,
[Order Line No_] int NOT NULL,
[Posting Date] datetime NOT NULL,
[Branch Book No_] varchar(20) NOT NULL,
[Order Type] int NOT NULL,
[Item Type] int NOT NULL,
[VIN] varchar(20) NOT NULL,
[Vehicle Status] int NOT NULL,
[Registration Date] datetime NOT NULL,
[Mileage] int NOT NULL,
[Expected Shipping Week] datetime NOT NULL,
[License No_] varchar(20) NOT NULL,
[Indentation] int NOT NULL,
[Totaling] varchar(30) NOT NULL,
[Service Order No_] varchar(20) NOT NULL,
[Service Order Line No_] int NOT NULL,
[Labor Make Code] varchar(10) NOT NULL,
[Labor No_] varchar(20) NOT NULL,
[Exch_ Parts Tax Base] decimal(38, 20) NOT NULL,
[Exch_ Parts Tax %] decimal(38, 20) NOT NULL,
[Exch_ Parts Tax Amount] decimal(38, 20) NOT NULL,
[Exch_ Parts VAT %] decimal(38, 20) NOT NULL,
[Allow Discount] tinyint NOT NULL,
[Cockpit Entry No_] int NOT NULL,
[Additional Item] int NOT NULL,
[Customer Group Code] varchar(10) NOT NULL,
[Item Group Code] varchar(10) NOT NULL,
[Quantity Multiplier] decimal(38, 20) NOT NULL,
[Cockpit Posting Entry No_] int NOT NULL,
[Automatic Surcharge] tinyint NOT NULL,
[Service Surcharge Code] varchar(10) NOT NULL,
[Main Customer] tinyint NOT NULL,
[Vehicle Unit Price Date] datetime NOT NULL,
[Print Option Line] tinyint NOT NULL,
[Print Unit Price] tinyint NOT NULL,
[ETP Credit Memo] tinyint NOT NULL,
[Ret_ Rcpt_ No_ not Closed] varchar(20) NOT NULL,
[Remaining Qty on Ret_ Rcpt_] decimal(38, 20) NOT NULL,
[Return Order No_] varchar(20) NOT NULL,
[Return Order Line No_] int NOT NULL,
[Return Deposit] tinyint NOT NULL,
[Business No_] varchar(20) NOT NULL,
[Disable for Requisition] tinyint NOT NULL,
[Complement Type] int NOT NULL,
[Print Vehicle Complement] tinyint NOT NULL,
[Service Contract No_] varchar(20) NOT NULL,
[Service Contract Invoice Order] tinyint NOT NULL)
ON [Data Filegroup 1]
WITH (DATA_COMPRESSION = NONE);
GO

