Tables [dbo].[QuoteRevenueImport]
Properties
PropertyValue
HeapYes
Row Count (~)0
Created5:00:23 PM Monday, April 21, 2008
Last Modified3:48:38 PM Thursday, December 6, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_QuoteRevenueImport: QuoteRevenueImportIDQuoteRevenueImportIDint4
No
1 - 1
Foreign Keys FK_QuoteRevenueImport_QuoteGroup: [dbo].[QuoteGroup].QuoteGroupFIDQuoteGroupFIDint4
Yes
Foreign Keys FK_QuoteRevenueImport_QuoteDetail: [dbo].[QuoteDetail].QuoteDetailFIDQuoteDetailFIDint4
Yes
Foreign Keys FK_QuoteRevenueImport_BillingMinorItem: [dbo].[BillingMinorItem].BillingMinorItemFIDIndexes IX_QuoteRevenueImport_BillingMinorItem: BillingMinorItemFIDBillingMinorItemFIDint4
Yes
ImportedDatedatetime8
No
Foreign Keys FK_QuoteRevenueImport_ImportedBySysuser: [dbo].[Sysuser].ImportedBySysuserFIDIndexes IX_QuoteRevenueImport_ImportedBySysuserFID: ImportedBySysuserFIDImportedBySysuserFIDint4
No
Foreign Keys FK_QuoteRevenueImport_Agent: [dbo].[Agent].AgentFIDAgentFIDint4
No
Foreign Keys FK_QuoteRevenueImport_BillingMajorItem: [dbo].[BillingMajorItem].BillingMajorItemFIDIndexes IX_QuoteRevenueImport_BillingMajorItem: BillingMajorItemFIDBillingMajorItemFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_QuoteRevenueImport: QuoteRevenueImportIDPK_QuoteRevenueImportQuoteRevenueImportID
Yes
80
IX_QuoteRevenueImport_BillingMajorItemBillingMajorItemFID
IX_QuoteRevenueImport_BillingMinorItemBillingMinorItemFID
IX_QuoteRevenueImport_ImportedBySysuserFIDImportedBySysuserFID
Check Constraints Check Constraints
NameConstraint
CK_QuoteRevenueImport_Quote([QuoteGroupFID] IS NULL AND [QuoteDetailFID] IS NOT NULL OR [QuoteGroupFID] IS NOT NULL AND [QuoteDetailFID] IS NULL)
Foreign Keys Foreign Keys
NameDeleteColumns
FK_QuoteRevenueImport_AgentAgentFID->[dbo].[Agent].[AgentPriKey]
FK_QuoteRevenueImport_BillingMajorItemCascadeBillingMajorItemFID->[dbo].[BillingMajorItem].[BMajPriKey]
FK_QuoteRevenueImport_BillingMinorItemCascadeBillingMinorItemFID->[dbo].[BillingMinorItem].[BMinPriKey]
FK_QuoteRevenueImport_ImportedBySysuserImportedBySysuserFID->[dbo].[Sysuser].[SysUserID]
FK_QuoteRevenueImport_QuoteDetailQuoteDetailFID->[dbo].[QuoteDetail].[QuoteDetailID]
FK_QuoteRevenueImport_QuoteGroupQuoteGroupFID->[dbo].[QuoteGroup].[QuoteGroupID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[QuoteRevenueImport]
(
[QuoteRevenueImportID] [int] NOT NULL IDENTITY(1, 1),
[QuoteGroupFID] [int] NULL,
[QuoteDetailFID] [int] NULL,
[BillingMinorItemFID] [int] NULL,
[ImportedDate] [datetime] NOT NULL,
[ImportedBySysuserFID] [int] NOT NULL,
[AgentFID] [int] NOT NULL,
[BillingMajorItemFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [CK_QuoteRevenueImport_Quote] CHECK (([QuoteGroupFID] IS NULL AND [QuoteDetailFID] IS NOT NULL OR [QuoteGroupFID] IS NOT NULL AND [QuoteDetailFID] IS NULL))
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [PK_QuoteRevenueImport] PRIMARY KEY NONCLUSTERED  ([QuoteRevenueImportID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_QuoteRevenueImport_BillingMajorItem] ON [dbo].[QuoteRevenueImport] ([BillingMajorItemFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_QuoteRevenueImport_BillingMinorItem] ON [dbo].[QuoteRevenueImport] ([BillingMinorItemFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_QuoteRevenueImport_ImportedBySysuserFID] ON [dbo].[QuoteRevenueImport] ([ImportedBySysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [FK_QuoteRevenueImport_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [FK_QuoteRevenueImport_BillingMajorItem] FOREIGN KEY ([BillingMajorItemFID]) REFERENCES [dbo].[BillingMajorItem] ([BMajPriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [FK_QuoteRevenueImport_BillingMinorItem] FOREIGN KEY ([BillingMinorItemFID]) REFERENCES [dbo].[BillingMinorItem] ([BMinPriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [FK_QuoteRevenueImport_ImportedBySysuser] FOREIGN KEY ([ImportedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [FK_QuoteRevenueImport_QuoteDetail] FOREIGN KEY ([QuoteDetailFID]) REFERENCES [dbo].[QuoteDetail] ([QuoteDetailID])
GO
ALTER TABLE [dbo].[QuoteRevenueImport] ADD CONSTRAINT [FK_QuoteRevenueImport_QuoteGroup] FOREIGN KEY ([QuoteGroupFID]) REFERENCES [dbo].[QuoteGroup] ([QuoteGroupID])
GO
GRANT SELECT ON  [dbo].[QuoteRevenueImport] TO [MssExec]
GRANT INSERT ON  [dbo].[QuoteRevenueImport] TO [MssExec]
GRANT DELETE ON  [dbo].[QuoteRevenueImport] TO [MssExec]
GRANT UPDATE ON  [dbo].[QuoteRevenueImport] TO [MssExec]
GO
Uses