Tables [dbo].[RevenueRatingImportedDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)42400
Created4:57:10 PM Thursday, September 7, 2006
Last Modified1:48:13 PM Wednesday, April 10, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_RevenueRatingImportedDetail: RevenueRatingImportedDetailIDIndexes IX_RevenueRatingImportedDetail_RevenueRatingImportDetailFID: RevenueRatingImportedDetailID\RevenueRatingImportDetailFIDRevenueRatingImportedDetailIDint4
No
1 - 1
Foreign Keys FK_RevenueRatingImportedDetail_Agent: [dbo].[Agent].AgentFIDAgentFIDint4
Yes
CartonCodevarchar(50)50
Yes
Descriptionvarchar(128)128
Yes
Discountdecimal(12,4)9
Yes
DistributionAmountdecimal(12,4)9
Yes
DistributionCodevarchar(10)10
Yes
GrossAmountdecimal(12,4)9
Yes
ImportDateTimedatetime8
Yes
InvoiceAmountdecimal(12,4)9
Yes
Quantitydecimal(12,4)9
Yes
Ratedecimal(12,4)9
Yes
Cluster Key IX_RevenueRatingImportedHeaderFID: RevenueRatingImportedHeaderFIDForeign Keys FK_RevenueRatingImportedDetail_RevenueRatingImportedHeader: [dbo].[RevenueRatingImportedHeader].RevenueRatingImportedHeaderFIDIndexes IX_RevenueRatingImportedDetail_BillingMinorItem: RevenueRatingImportedHeaderFID\BillingMinorFIDRevenueRatingImportedHeaderFIDint4
No
RevenueTypevarchar(4)4
Yes
Indexes IX_RevenueRatingImportedDetail_BillingMinorItem: RevenueRatingImportedHeaderFID\BillingMinorFIDBillingMinorFIDint4
Yes
BillingMajorFIDint4
Yes
OrdersFIDint4
Yes
AgentPercentagedecimal(12,4)9
Yes
Foreign Keys FK_RevenueRatingImportedDetail_RevenueRatingImportDetail: [dbo].[RevenueRatingImportDetail].RevenueRatingImportDetailFIDIndexes IX_RevenueRatingImportedDetail_RevenueRatingImportDetailFID: RevenueRatingImportedDetailID\RevenueRatingImportDetailFIDRevenueRatingImportDetailFIDint4
Yes
InvoiceFlagbit1
Yes
Indexes IX_RevenueRatingImportedDetail_CarrierBillingMinor: CarrierBillingMinorFIDCarrierBillingMinorFIDint4
Yes
CarrierBillingMajorFIDint4
Yes
AddBackFlagbit1
Yes
((0))
Foreign Keys FK_RevenueRatingImportedDetail_PointOfService: [dbo].[PointOfService].PointOfServiceFIDPointOfServiceFIDint4
Yes
Foreign Keys FK_RevenueRatingImportedDetail_RateType: [dbo].[RateTypes].RateTypeFIDRateTypeFIDint4
Yes
Quantity2decimal(12,4)9
Yes
MilitaryItemCodevarchar(32)32
Yes
MilitaryItemCodeQualifiervarchar(32)32
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_RevenueRatingImportedDetail: RevenueRatingImportedDetailIDPK_RevenueRatingImportedDetailRevenueRatingImportedDetailID
Yes
80
IX_RevenueRatingImportedDetail_BillingMinorItemRevenueRatingImportedHeaderFID, BillingMinorFID
IX_RevenueRatingImportedDetail_CarrierBillingMinorCarrierBillingMinorFID
IX_RevenueRatingImportedDetail_RevenueRatingImportDetailFIDRevenueRatingImportedDetailID, RevenueRatingImportDetailFID80
Cluster Key IX_RevenueRatingImportedHeaderFID: RevenueRatingImportedHeaderFIDIX_RevenueRatingImportedHeaderFIDRevenueRatingImportedHeaderFID80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_RevenueRatingImportedDetail_AgentAgentFID->[dbo].[Agent].[AgentPriKey]
FK_RevenueRatingImportedDetail_PointOfServiceSetNullPointOfServiceFID->[dbo].[PointOfService].[PointOfServiceID]
FK_RevenueRatingImportedDetail_RateTypeSetNullRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
FK_RevenueRatingImportedDetail_RevenueRatingImportDetailSetNullRevenueRatingImportDetailFID->[dbo].[RevenueRatingImportDetail].[RevenueRatingImportDetailID]
FK_RevenueRatingImportedDetail_RevenueRatingImportedHeaderRevenueRatingImportedHeaderFID->[dbo].[RevenueRatingImportedHeader].[RevenueRatingImportedHeaderID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[RevenueRatingImportedDetail]
(
[RevenueRatingImportedDetailID] [int] NOT NULL IDENTITY(1, 1),
[AgentFID] [int] NULL,
[CartonCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Discount] [decimal] (12, 4) NULL,
[DistributionAmount] [decimal] (12, 4) NULL,
[DistributionCode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GrossAmount] [decimal] (12, 4) NULL,
[ImportDateTime] [datetime] NULL,
[InvoiceAmount] [decimal] (12, 4) NULL,
[Quantity] [decimal] (12, 4) NULL,
[Rate] [decimal] (12, 4) NULL,
[RevenueRatingImportedHeaderFID] [int] NOT NULL,
[RevenueType] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingMinorFID] [int] NULL,
[BillingMajorFID] [int] NULL,
[OrdersFID] [int] NULL,
[AgentPercentage] [decimal] (12, 4) NULL,
[RevenueRatingImportDetailFID] [int] NULL,
[InvoiceFlag] [bit] NULL,
[CarrierBillingMinorFID] [int] NULL,
[CarrierBillingMajorFID] [int] NULL,
[AddBackFlag] [bit] NULL CONSTRAINT [DF_RevenueRatingImportedDetail_AddBackFlag] DEFAULT ((0)),
[PointOfServiceFID] [int] NULL,
[RateTypeFID] [int] NULL,
[Quantity2] [decimal] (12, 4) NULL,
[MilitaryItemCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MilitaryItemCodeQualifier] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetail] ADD CONSTRAINT [PK_RevenueRatingImportedDetail] PRIMARY KEY NONCLUSTERED  ([RevenueRatingImportedDetailID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportedDetail_BillingMinorItem] ON [dbo].[RevenueRatingImportedDetail] ([BillingMinorFID]) INCLUDE ([RevenueRatingImportedHeaderFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportedDetail_CarrierBillingMinor] ON [dbo].[RevenueRatingImportedDetail] ([CarrierBillingMinorFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportedDetail_RevenueRatingImportDetailFID] ON [dbo].[RevenueRatingImportedDetail] ([RevenueRatingImportDetailFID]) INCLUDE ([RevenueRatingImportedDetailID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_RevenueRatingImportedHeaderFID] ON [dbo].[RevenueRatingImportedDetail] ([RevenueRatingImportedHeaderFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetail] ADD CONSTRAINT [FK_RevenueRatingImportedDetail_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetail] ADD CONSTRAINT [FK_RevenueRatingImportedDetail_PointOfService] FOREIGN KEY ([PointOfServiceFID]) REFERENCES [dbo].[PointOfService] ([PointOfServiceID]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetail] ADD CONSTRAINT [FK_RevenueRatingImportedDetail_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetail] ADD CONSTRAINT [FK_RevenueRatingImportedDetail_RevenueRatingImportDetail] FOREIGN KEY ([RevenueRatingImportDetailFID]) REFERENCES [dbo].[RevenueRatingImportDetail] ([RevenueRatingImportDetailID]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetail] ADD CONSTRAINT [FK_RevenueRatingImportedDetail_RevenueRatingImportedHeader] FOREIGN KEY ([RevenueRatingImportedHeaderFID]) REFERENCES [dbo].[RevenueRatingImportedHeader] ([RevenueRatingImportedHeaderID])
GO
GRANT SELECT ON  [dbo].[RevenueRatingImportedDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[RevenueRatingImportedDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[RevenueRatingImportedDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[RevenueRatingImportedDetail] TO [MssExec]
GO
Uses
Used By