Header table:
CREATE TABLE [dbo].[PaymentBatchAccounts]( [Id] [int] IDENTITY(1,1) NOT NULL, [AccountLink] [int] NOT NULL, [iAllowICPurchases] [bit] NOT NULL, [Master_Sub_Account] [nvarchar](max) NULL, [Account_Type] [nvarchar](max) NULL, [Description] [nvarchar](max) NULL, [iAccountType] [int] NOT NULL, [AcLookup] [nvarchar](max) NULL, [iForeignBankCurrencyID] [int] NOT NULL, [CurrencyCode] [nvarchar](max) NULL, [CurrencyId] [int] NOT NULL, [BranchId] [bigint] NULL, CONSTRAINT [PK_PaymentBatchAccounts] PRIMARY KEY CLUSTERED |