Tables [dbo].[Storage]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)856
Created4:57:09 PM Thursday, September 7, 2006
Last Modified9:18:49 AM Friday, November 8, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Primary Key PK_Storage: StoragePriKeyStoragePriKeyint4
No
1 - 1Primary key.
Foreign Keys FK_Storage_Orders: [dbo].[Orders].OrdPriKeyIndexes IX_Storage_Order: OrdPriKeyIndexes IX_Unique_OrderID_RecordName: OrdPriKey\RecordNameOrdPriKeyint4
No
Foreign key to an order.
DateStorageIndatetime8
Yes
Date the order moved into storage.
DateStorageOutdatetime8
Yes
Date the order moved out of storage.
DateScheduledOutdatetime8
Yes
Date the order is scheduled to move out of storage.
BeginBillingDatedatetime8
Yes
Date the order starts billing.
Foreign Keys FK_Storage_AuthorityTypes: [dbo].[AuthorityTypes].AuthorityPriKeyAuthorityPriKeyint4
No
Foreign key to an authority.
Foreign Keys FK_Storage_StorageBillingCycleType: [dbo].[StorageBillingCycleType].BillingCyclePriKeyBillingCyclePriKeyint4
No
Foreign key to a billing cycle.
Foreign Keys FK_Storage_StorageType: [dbo].[StorageType].StorageTypePriKeyStorageTypePriKeyint4
No
Foreign key to a storage type.
Foreign Keys FK_Storage_RatePlans: [dbo].[RatePlans].RPPriKeyIndexes IX_Storage_RPPriKey: RPPriKeyRPPriKeyint4
Yes
Foreign key to a rate plan.
Foreign Keys FK_Storage_AlternateBillTo: [dbo].[AlternateBillTo].ABTPriKeyABTPriKeyint4
Yes
Foreign key to an alternate billing customer.
Foreign Keys FK_Storage_AccountingNote: [dbo].[AccountingNote].ANPriKeyANPriKeyint4
Yes
Foriegn key to an accounting note.
IsInvoicedbit1
No
0 if the order does not produce a storage invoice. 1 if it does produce a storage invoice.
LastBillDateFromdatetime8
Yes
The last starting date the order was billed.
LastBillDateTodatetime8
Yes
The last ending date the order was billed.
NextBillDatedatetime8
Yes
The date the order is going to be billed next.
Foreign Keys FK_Storage_Sysuser: [dbo].[Sysuser].StorageCoordinatorIndexes IX_Storage_StorageCoordinator: StorageCoordinatorStorageCoordinatorint4
Yes
Foreign key to the storage coordinator.
Indexes IX_Unique_OrderID_RecordName: OrdPriKey\RecordNameRecordNamevarchar(64)64
No
EmailAddressesvarchar(255)255
Yes
Foreign Keys FK_Storage_Instrument: [dbo].[PlasticInstrument].InstrumentFIDInstrumentFIDint4
Yes
UseOnlinePaymentbit1
No
((0))
EmailInvoicebit1
No
((0))
EmailAutoPayReceiptbit1
No
((0))
Foreign Keys FK_Storage_FirstRecurringTransInstrument: [dbo].[PlasticInstrument].FirstRecurringTransInstrumentFIDFirstRecurringTransInstrumentFIDint4
Yes
FirstRecurringTransIdnvarchar(64)128
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_Storage: StoragePriKeyPK_StorageStoragePriKey
Yes
80
IX_Unique_OrderID_RecordNameOrdPriKey, RecordName
Yes
80
IX_Storage_OrderOrdPriKey80
IX_Storage_RPPriKeyRPPriKey
IX_Storage_StorageCoordinatorStorageCoordinator
Foreign Keys Foreign Keys
NameColumns
FK_Storage_AlternateBillToABTPriKey->[dbo].[AlternateBillTo].[ABTPriKey]
FK_Storage_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_Storage_AuthorityTypesAuthorityPriKey->[dbo].[AuthorityTypes].[AuthPriKey]
FK_Storage_StorageBillingCycleTypeBillingCyclePriKey->[dbo].[StorageBillingCycleType].[BillingCyclePriKey]
FK_Storage_FirstRecurringTransInstrumentFirstRecurringTransInstrumentFID->[dbo].[PlasticInstrument].[InstrumentID]
FK_Storage_InstrumentInstrumentFID->[dbo].[PlasticInstrument].[InstrumentID]
FK_Storage_OrdersOrdPriKey->[dbo].[Orders].[PriKey]
FK_Storage_RatePlansRPPriKey->[dbo].[RatePlans].[RPPriKey]
FK_Storage_SysuserStorageCoordinator->[dbo].[Sysuser].[SysUserID]
FK_Storage_StorageTypeStorageTypePriKey->[dbo].[StorageType].[StorageTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[Storage]
(
[StoragePriKey] [int] NOT NULL IDENTITY(1, 1),
[OrdPriKey] [int] NOT NULL,
[DateStorageIn] [datetime] NULL,
[DateStorageOut] [datetime] NULL,
[DateScheduledOut] [datetime] NULL,
[BeginBillingDate] [datetime] NULL,
[AuthorityPriKey] [int] NOT NULL,
[BillingCyclePriKey] [int] NOT NULL,
[StorageTypePriKey] [int] NOT NULL,
[RPPriKey] [int] NULL,
[ABTPriKey] [int] NULL,
[ANPriKey] [int] NULL,
[IsInvoiced] [bit] NOT NULL,
[LastBillDateFrom] [datetime] NULL,
[LastBillDateTo] [datetime] NULL,
[NextBillDate] [datetime] NULL,
[StorageCoordinator] [int] NULL,
[RecordName] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EmailAddresses] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InstrumentFID] [int] NULL,
[UseOnlinePayment] [bit] NOT NULL CONSTRAINT [DF_Storage_UseOnlinePayment] DEFAULT ((0)),
[EmailInvoice] [bit] NOT NULL CONSTRAINT [DF_Storage_EmailInvoice] DEFAULT ((0)),
[EmailAutoPayReceipt] [bit] NOT NULL CONSTRAINT [DF_Storage_EmailAutoPayReceipt] DEFAULT ((0)),
[FirstRecurringTransInstrumentFID] [int] NULL,
[FirstRecurringTransId] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [PK_Storage] PRIMARY KEY NONCLUSTERED  ([StoragePriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [IX_Unique_OrderID_RecordName] UNIQUE NONCLUSTERED  ([OrdPriKey], [RecordName]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Storage_Order] ON [dbo].[Storage] ([OrdPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Storage_RPPriKey] ON [dbo].[Storage] ([RPPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Storage_StorageCoordinator] ON [dbo].[Storage] ([StorageCoordinator]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_AlternateBillTo] FOREIGN KEY ([ABTPriKey]) REFERENCES [dbo].[AlternateBillTo] ([ABTPriKey])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_AuthorityTypes] FOREIGN KEY ([AuthorityPriKey]) REFERENCES [dbo].[AuthorityTypes] ([AuthPriKey])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_StorageBillingCycleType] FOREIGN KEY ([BillingCyclePriKey]) REFERENCES [dbo].[StorageBillingCycleType] ([BillingCyclePriKey])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_FirstRecurringTransInstrument] FOREIGN KEY ([FirstRecurringTransInstrumentFID]) REFERENCES [dbo].[PlasticInstrument] ([InstrumentID])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_Instrument] FOREIGN KEY ([InstrumentFID]) REFERENCES [dbo].[PlasticInstrument] ([InstrumentID])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_Orders] FOREIGN KEY ([OrdPriKey]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_RatePlans] FOREIGN KEY ([RPPriKey]) REFERENCES [dbo].[RatePlans] ([RPPriKey])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_Sysuser] FOREIGN KEY ([StorageCoordinator]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[Storage] ADD CONSTRAINT [FK_Storage_StorageType] FOREIGN KEY ([StorageTypePriKey]) REFERENCES [dbo].[StorageType] ([StorageTypePriKey])
GO
GRANT SELECT ON  [dbo].[Storage] TO [MssExec]
GRANT INSERT ON  [dbo].[Storage] TO [MssExec]
GRANT DELETE ON  [dbo].[Storage] TO [MssExec]
GRANT UPDATE ON  [dbo].[Storage] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to an alternate billing customer.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'ABTPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foriegn key to an accounting note.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'ANPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to an authority.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'AuthorityPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date the order starts billing.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'BeginBillingDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a billing cycle.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'BillingCyclePriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date the order is scheduled to move out of storage.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'DateScheduledOut'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date the order moved into storage.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'DateStorageIn'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date the order moved out of storage.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'DateStorageOut'
GO
EXEC sp_addextendedproperty N'MS_Description', N'0 if the order does not produce a storage invoice. 1 if it does produce a storage invoice.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'IsInvoiced'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The last starting date the order was billed.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'LastBillDateFrom'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The last ending date the order was billed.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'LastBillDateTo'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The date the order is going to be billed next.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'NextBillDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to an order.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'OrdPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a rate plan.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'RPPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to the storage coordinator.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'StorageCoordinator'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'StoragePriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a storage type.', 'SCHEMA', N'dbo', 'TABLE', N'Storage', 'COLUMN', N'StorageTypePriKey'
GO
Uses
Used By