Tables [dbo].[RevenueRatingImportInvoiceDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created7:36:06 PM Tuesday, June 11, 2024
Last Modified7:36:09 PM Tuesday, June 11, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_RevenueRatingImportInvoiceDetail: RevenueRatingImportInvoiceDetailIDRevenueRatingImportInvoiceDetailIDint4
No
1 - 1
Cluster Key IX_RevenueRatingImportInvoiceDetailFID: RevenueRatingImportHeaderFIDForeign Keys FK_RevenueRatingImportInvoiceDetail_RevenueRatingImportHeader: [dbo].[RevenueRatingImportHeader].RevenueRatingImportHeaderFIDRevenueRatingImportHeaderFIDint4
No
Foreign Keys FK_RevenueRatingImportInvoiceDetail_Agent: [dbo].[Agent].AgentFIDAgentFIDint4
Yes
Descriptionvarchar(128)128
Yes
GrossAmountdecimal(12,4)9
Yes
DiscountPctdecimal(12,4)9
Yes
DistributionCodevarchar(10)10
Yes
PrintDescriptionvarchar(128)128
Yes
Quantity2decimal(12,4)9
Yes
Quantitydecimal(12,4)9
Yes
Ratedecimal(12,4)9
Yes
Foreign Keys FK_RevenueRatingImportInvoiceDetail_RateType: [dbo].[RateTypes].RateTypeFIDRateTypeFIDint4
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_RevenueRatingImportInvoiceDetail: RevenueRatingImportInvoiceDetailIDPK_RevenueRatingImportInvoiceDetailRevenueRatingImportInvoiceDetailID
Yes
Cluster Key IX_RevenueRatingImportInvoiceDetailFID: RevenueRatingImportHeaderFIDIX_RevenueRatingImportInvoiceDetailFIDRevenueRatingImportHeaderFID
Foreign Keys Foreign Keys
NameDeleteColumns
FK_RevenueRatingImportInvoiceDetail_AgentAgentFID->[dbo].[Agent].[AgentPriKey]
FK_RevenueRatingImportInvoiceDetail_RateTypeSetNullRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
FK_RevenueRatingImportInvoiceDetail_RevenueRatingImportHeaderCascadeRevenueRatingImportHeaderFID->[dbo].[RevenueRatingImportHeader].[RevenueRatingImportHeaderID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[RevenueRatingImportInvoiceDetail]
(
[RevenueRatingImportInvoiceDetailID] [int] NOT NULL IDENTITY(1, 1),
[RevenueRatingImportHeaderFID] [int] NOT NULL,
[AgentFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GrossAmount] [decimal] (12, 4) NULL,
[DiscountPct] [decimal] (12, 4) NULL,
[DistributionCode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PrintDescription] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Quantity2] [decimal] (12, 4) NULL,
[Quantity] [decimal] (12, 4) NULL,
[Rate] [decimal] (12, 4) NULL,
[RateTypeFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportInvoiceDetail] ADD CONSTRAINT [PK_RevenueRatingImportInvoiceDetail] PRIMARY KEY NONCLUSTERED  ([RevenueRatingImportInvoiceDetailID]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_RevenueRatingImportInvoiceDetailFID] ON [dbo].[RevenueRatingImportInvoiceDetail] ([RevenueRatingImportHeaderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportInvoiceDetail] ADD CONSTRAINT [FK_RevenueRatingImportInvoiceDetail_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[RevenueRatingImportInvoiceDetail] ADD CONSTRAINT [FK_RevenueRatingImportInvoiceDetail_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[RevenueRatingImportInvoiceDetail] ADD CONSTRAINT [FK_RevenueRatingImportInvoiceDetail_RevenueRatingImportHeader] FOREIGN KEY ([RevenueRatingImportHeaderFID]) REFERENCES [dbo].[RevenueRatingImportHeader] ([RevenueRatingImportHeaderID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[RevenueRatingImportInvoiceDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[RevenueRatingImportInvoiceDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[RevenueRatingImportInvoiceDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[RevenueRatingImportInvoiceDetail] TO [MssExec]
GO
Uses
Used By