Tables [dbo].[StorageInvHistCrBatch]
Properties
PropertyValue
HeapYes
Row Count (~)0
Created7:17:39 AM Friday, December 7, 2018
Last Modified9:17:42 AM Friday, November 8, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_StorageInvHistCrBatch: StorageInvHistCrBatchIDStorageInvHistCrBatchIDint4
No
1 - 1
Foreign Keys FK_StorageInvHistCrBatch_StorageInvoiceHistorical: [dbo].[StorageInvoiceHistorical].StorageInvoiceHistoricalFIDIndexes IX_StorageInvHistCrBatch_StgInvHist_Branch_StorageType: StorageInvoiceHistoricalFID\BranchFID\StorageTypeFID\ProviderTypeFIDStorageInvoiceHistoricalFIDint4
No
Foreign Keys FK_StorageInvHistCrBatch_Branch: [dbo].[Branch].BranchFIDIndexes IX_StorageInvHistCrBatch_StgInvHist_Branch_StorageType: StorageInvoiceHistoricalFID\BranchFID\StorageTypeFID\ProviderTypeFIDBranchFIDint4
No
Foreign Keys FK_StorageInvHistCrBatch_StorageType: [dbo].[StorageType].StorageTypeFIDIndexes IX_StorageInvHistCrBatch_StgInvHist_Branch_StorageType: StorageInvoiceHistoricalFID\BranchFID\StorageTypeFID\ProviderTypeFIDStorageTypeFIDint4
No
Foreign Keys FK_StorageInvHistCrBatch_StatementHeader: [dbo].[StatementHeader].StatementHeaderFIDIndexes IX_StorageInvHistCrBatch_StatementHeader: StatementHeaderFIDStatementHeaderFIDint4
No
Foreign Keys FK_StorageInvHistCrBatch_ProviderType: [dbo].[PlasticProviderType].ProviderTypeFIDIndexes IX_StorageInvHistCrBatch_StgInvHist_Branch_StorageType: StorageInvoiceHistoricalFID\BranchFID\StorageTypeFID\ProviderTypeFIDProviderTypeFIDint4
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_StorageInvHistCrBatch: StorageInvHistCrBatchIDPK_StorageInvHistCrBatchStorageInvHistCrBatchID
Yes
IX_StorageInvHistCrBatch_StatementHeaderStatementHeaderFID
Yes
IX_StorageInvHistCrBatch_StgInvHist_Branch_StorageTypeStorageInvoiceHistoricalFID, BranchFID, StorageTypeFID, ProviderTypeFID
Foreign Keys Foreign Keys
NameColumns
FK_StorageInvHistCrBatch_BranchBranchFID->[dbo].[Branch].[BranchPriKey]
FK_StorageInvHistCrBatch_ProviderTypeProviderTypeFID->[dbo].[PlasticProviderType].[ProviderTypeID]
FK_StorageInvHistCrBatch_StatementHeaderStatementHeaderFID->[dbo].[StatementHeader].[SHPriKey]
FK_StorageInvHistCrBatch_StorageInvoiceHistoricalStorageInvoiceHistoricalFID->[dbo].[StorageInvoiceHistorical].[StorageInvoiceHistoricalID]
FK_StorageInvHistCrBatch_StorageTypeStorageTypeFID->[dbo].[StorageType].[StorageTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[StorageInvHistCrBatch]
(
[StorageInvHistCrBatchID] [int] NOT NULL IDENTITY(1, 1),
[StorageInvoiceHistoricalFID] [int] NOT NULL,
[BranchFID] [int] NOT NULL,
[StorageTypeFID] [int] NOT NULL,
[StatementHeaderFID] [int] NOT NULL,
[ProviderTypeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageInvHistCrBatch] ADD CONSTRAINT [PK_StorageInvHistCrBatch] PRIMARY KEY NONCLUSTERED  ([StorageInvHistCrBatchID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_StorageInvHistCrBatch_StatementHeader] ON [dbo].[StorageInvHistCrBatch] ([StatementHeaderFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StorageInvHistCrBatch_StgInvHist_Branch_StorageType] ON [dbo].[StorageInvHistCrBatch] ([StorageInvoiceHistoricalFID], [BranchFID], [StorageTypeFID], [ProviderTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageInvHistCrBatch] ADD CONSTRAINT [FK_StorageInvHistCrBatch_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[StorageInvHistCrBatch] ADD CONSTRAINT [FK_StorageInvHistCrBatch_ProviderType] FOREIGN KEY ([ProviderTypeFID]) REFERENCES [dbo].[PlasticProviderType] ([ProviderTypeID])
GO
ALTER TABLE [dbo].[StorageInvHistCrBatch] ADD CONSTRAINT [FK_StorageInvHistCrBatch_StatementHeader] FOREIGN KEY ([StatementHeaderFID]) REFERENCES [dbo].[StatementHeader] ([SHPriKey])
GO
ALTER TABLE [dbo].[StorageInvHistCrBatch] ADD CONSTRAINT [FK_StorageInvHistCrBatch_StorageInvoiceHistorical] FOREIGN KEY ([StorageInvoiceHistoricalFID]) REFERENCES [dbo].[StorageInvoiceHistorical] ([StorageInvoiceHistoricalID])
GO
ALTER TABLE [dbo].[StorageInvHistCrBatch] ADD CONSTRAINT [FK_StorageInvHistCrBatch_StorageType] FOREIGN KEY ([StorageTypeFID]) REFERENCES [dbo].[StorageType] ([StorageTypePriKey])
GO
GRANT SELECT ON  [dbo].[StorageInvHistCrBatch] TO [MssExec]
GRANT INSERT ON  [dbo].[StorageInvHistCrBatch] TO [MssExec]
GRANT DELETE ON  [dbo].[StorageInvHistCrBatch] TO [MssExec]
GRANT UPDATE ON  [dbo].[StorageInvHistCrBatch] TO [MssExec]
GO
Uses