CREATE TABLE [import].[ACCT_DOC_SALESCLAS] (
   [REFERENCE_IDENT] [numeric](12,0) NOT NULL,
   [INVOICE_NUMBER] [numeric](15,0) NOT NULL,
   [ORDER_NUMBER] [numeric](15,0) NOT NULL,
   [CLASS_LINE_TYPE] [char](1) NOT NULL,
   [ORDER_LINE_NUMBER] [numeric](4,0) NOT NULL,
   [SALES_SPEC_TYPE] [char](1) NOT NULL,
   [UNDER_LINE_NUMBER] [numeric](4,0) NOT NULL,
   [ORDER_LINE_TYPE] [char](1) NOT NULL,
   [CUSTOMER_NUMBER] [char](10) NOT NULL,
   [PLACE_CODE] [char](1) NOT NULL,
   [INTERNAL_CODE] [char](1) NOT NULL,
   [N_PRODUCT_GROUP] [char](3) NOT NULL,
   [N_STOCK_CODE] [char](2) NOT NULL,
   [N_DEPARTMENT] [char](4) NOT NULL,
   [SPEC_CODE] [varchar](20) NOT NULL,
   [VAT_PERC_ORDER] [numeric](4,2) NOT NULL,
   [TRANSFERREL_CODE] [char](2) NOT NULL,
   [M_REQUISITION_NO] [char](10) NOT NULL,
   [CONV_FLAG] [char](1) NULL,
   [timestamp] [binary](8) NOT NULL,
   [UNIQUE_IDENT] [numeric](12,0) NOT NULL,
   [CLIENT_DB] [varchar](20) NOT NULL

   ,CONSTRAINT [PK_ACCT_DOC_SALESCLAS] PRIMARY KEY CLUSTERED ([REFERENCE_IDENT], [UNIQUE_IDENT], [CLIENT_DB])
)

CREATE NONCLUSTERED INDEX [IX_ACCT_DOC_SALESCLAS] ON [import].[ACCT_DOC_SALESCLAS] ([REFERENCE_IDENT], [CLIENT_DB])
CREATE NONCLUSTERED INDEX [IX_ACCT_DOC_SALESCLAS_1] ON [import].[ACCT_DOC_SALESCLAS] ([ORDER_NUMBER], [CLIENT_DB])

GO
