CREATE TABLE [import].[ACCT_DOC_DATA] (
   [REFERENCE_IDENT] [numeric](12,0) NOT NULL,
   [TRANSACT_DATE] [datetime] NOT NULL,
   [HANDLER] [char](4) NOT NULL,
   [PROGRAM] [char](6) NOT NULL,
   [FUNCTION_CODE] [char](4) NOT NULL,
   [MODUL] [char](1) NOT NULL,
   [DOCUMENT_KEY] [char](1) NOT NULL,
   [SUB_ACCT_TYPE] [char](1) NOT NULL,
   [SUB_ACCT_NO] [varchar](50) NOT NULL,
   [TRANSACT_CODE] [char](3) NOT NULL,
   [COMMENT] [varchar](255) NOT NULL,
   [VAT_CODE] [char](1) NOT NULL,
   [VAT_PERC] [numeric](4,2) NOT NULL,
   [INV_PERC] [numeric](4,2) NOT NULL,
   [PURCH_INVNO] [varchar](30) NOT NULL,
   [SETOFF_ACCT] [varchar](50) NOT NULL,
   [CHEQUE_NUMBER] [varchar](50) NOT NULL,
   [ORIGINAL_BATCH_NO] [numeric](15,0) NOT NULL,
   [DOCUMENT_DATE] [datetime] NOT NULL,
   [VAT_TABLE_CODE] [char](1) NULL,
   [ADD_VAT_RATE_CODE] [char](2) NULL,
   [ADD_VAT_TABLE_CODE] [char](1) NULL,
   [ADD_VAT_PERC] [numeric](4,2) NULL,
   [BALANCING_COMMENT] [varchar](50) NULL,
   [CONV_FLAG] [char](1) NULL,
   [timestamp] [binary](8) NOT NULL,
   [UNIQUE_IDENT] [numeric](12,0) NOT NULL,
   [EEC_VAT_WORK_CODE] [char](1) NULL,
   [CLIENT_DB] [varchar](20) NOT NULL

)

CREATE NONCLUSTERED INDEX [IX_ACCT_DOC_DATA] ON [import].[ACCT_DOC_DATA] ([REFERENCE_IDENT], [CLIENT_DB])

GO
