[dbo].[VanlineStatementImport]
CREATE TABLE [dbo].[VanlineStatementImport]
(
[VanlineStatementImportID] [int] NOT NULL IDENTITY(1, 1),
[VanlineStatementHeaderFID] [int] NOT NULL,
[StatementHeaderFID] [int] NOT NULL,
[ImportedDate] [datetime] NOT NULL,
[SysUserFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementImport] ADD CONSTRAINT [PK_VanlineStatementImport] PRIMARY KEY CLUSTERED ([VanlineStatementImportID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementImport_StatementHeader] ON [dbo].[VanlineStatementImport] ([StatementHeaderFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementImport_SysUser] ON [dbo].[VanlineStatementImport] ([SysUserFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementImport_VanlineStatementHeader] ON [dbo].[VanlineStatementImport] ([VanlineStatementHeaderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementImport] ADD CONSTRAINT [FK_VanlineStatementImport_StatementHeader] FOREIGN KEY ([StatementHeaderFID]) REFERENCES [dbo].[StatementHeader] ([SHPriKey])
GO
ALTER TABLE [dbo].[VanlineStatementImport] ADD CONSTRAINT [FK_VanlineStatementImport_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[VanlineStatementImport] ADD CONSTRAINT [FK_VanlineStatementImport_VanlineStatementHeader] FOREIGN KEY ([VanlineStatementHeaderFID]) REFERENCES [dbo].[VanlineStatementHeader] ([VanlineStatementHeaderID])
GO
GRANT SELECT ON [dbo].[VanlineStatementImport] TO [MssExec]
GRANT INSERT ON [dbo].[VanlineStatementImport] TO [MssExec]
GRANT DELETE ON [dbo].[VanlineStatementImport] TO [MssExec]
GRANT UPDATE ON [dbo].[VanlineStatementImport] TO [MssExec]
GO