CREATE TABLE [dbo].[parts] (
   [order_number] [int] NOT NULL,
   [order_position] [int] NOT NULL,
   [order_position_line] [int] NOT NULL,
   [subsidiary] [int] NULL,
   [is_invoiced] [smallint] NULL,
   [invoice_type] [int] NULL,
   [invoice_number] [int] NULL,
   [employee_no] [int] NULL,
   [mechanic_no] [int] NULL,
   [part_number] [varchar](100) NULL,
   [stock_no] [int] NULL,
   [stock_removal_date] [datetime] NULL,
   [amount] [numeric](11,2) NULL,
   [sum] [numeric](11,2) NULL,
   [rebate_percent] [numeric](9,6) NULL,
   [goodwill_percent] [numeric](9,6) NULL,
   [parts_type] [int] NULL,
   [text_line] [varchar](100) NULL,
   [usage_value] [numeric](11,2) NULL,
   [client_db] [varchar](20) NOT NULL

   ,CONSTRAINT [parts$0] PRIMARY KEY CLUSTERED ([order_number], [order_position], [order_position_line], [client_db])
)


GO
