[dbo].[BATProcessApplyToInfo]
CREATE TABLE [dbo].[BATProcessApplyToInfo]
(
[BATProcessApplyToInfoID] [int] NOT NULL IDENTITY(1, 1),
[BATProcessFID] [int] NOT NULL,
[ApplyToDocument] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ApplyAmount] [money] NOT NULL,
[ApplyToDocumentType] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ApplyToBATProcessID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BATProcessApplyToInfo] ADD CONSTRAINT [PK_BATProcessApplyToInfoID] PRIMARY KEY NONCLUSTERED ([BATProcessApplyToInfoID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ApplyToDocument] ON [dbo].[BATProcessApplyToInfo] ([ApplyToDocument]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_BATProcessFID] ON [dbo].[BATProcessApplyToInfo] ([BATProcessFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[BATProcessApplyToInfo] TO [MssExec]
GRANT INSERT ON [dbo].[BATProcessApplyToInfo] TO [MssExec]
GRANT DELETE ON [dbo].[BATProcessApplyToInfo] TO [MssExec]
GRANT UPDATE ON [dbo].[BATProcessApplyToInfo] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The applied amount of the applied document.', 'SCHEMA', N'dbo', 'TABLE', N'BATProcessApplyToInfo', 'COLUMN', N'ApplyAmount'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The document number of the applied document.', 'SCHEMA', N'dbo', 'TABLE', N'BATProcessApplyToInfo', 'COLUMN', N'ApplyToDocument'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Transaction type the applied document generated.', 'SCHEMA', N'dbo', 'TABLE', N'BATProcessApplyToInfo', 'COLUMN', N'ApplyToDocumentType'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'BATProcessApplyToInfo', 'COLUMN', N'BATProcessApplyToInfoID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a BATProcess record.', 'SCHEMA', N'dbo', 'TABLE', N'BATProcessApplyToInfo', 'COLUMN', N'BATProcessFID'
GO