Tables [dbo].[RevenueRatingImportDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)33515
Created4:57:10 PM Thursday, September 7, 2006
Last Modified9:07:46 AM Thursday, May 23, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_RevenueRatingImportDetail: RevenueRatingImportDetailIDRevenueRatingImportDetailIDint4
No
1 - 1
Foreign Keys FK_RevenueRatingImportDetail_Agent: [dbo].[Agent].AgentFIDAgentFIDint4
Yes
AgentPercentagedecimal(12,4)9
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
InvoiceAmountdecimal(12,4)9
Yes
Quantitydecimal(12,4)9
Yes
Ratedecimal(12,4)9
Yes
Cluster Key IX_RevenueRatingImportHeaderFID: RevenueRatingImportHeaderFIDForeign Keys FK_RevenueRatingImportDetail_RevenueRatingImportHeader: [dbo].[RevenueRatingImportHeader].RevenueRatingImportHeaderFIDRevenueRatingImportHeaderFIDint4
No
RevenueTypevarchar(4)4
Yes
InvoiceFlagbit1
Yes
AddBackFlagbit1
Yes
((0))
Foreign Keys FK_RevenueRatingImportDetail_PointOfService: [dbo].[PointOfService].PointOfServiceFIDPointOfServiceFIDint4
Yes
Foreign Keys FK_RevenueRatingImportDetail_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_RevenueRatingImportDetail: RevenueRatingImportDetailIDPK_RevenueRatingImportDetailRevenueRatingImportDetailID
Yes
80
Cluster Key IX_RevenueRatingImportHeaderFID: RevenueRatingImportHeaderFIDIX_RevenueRatingImportHeaderFIDRevenueRatingImportHeaderFID80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_RevenueRatingImportDetail_AgentAgentFID->[dbo].[Agent].[AgentPriKey]
FK_RevenueRatingImportDetail_PointOfServiceSetNullPointOfServiceFID->[dbo].[PointOfService].[PointOfServiceID]
FK_RevenueRatingImportDetail_RateTypeSetNullRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
FK_RevenueRatingImportDetail_RevenueRatingImportHeaderCascadeRevenueRatingImportHeaderFID->[dbo].[RevenueRatingImportHeader].[RevenueRatingImportHeaderID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[RevenueRatingImportDetail]
(
[RevenueRatingImportDetailID] [int] NOT NULL IDENTITY(1, 1),
[AgentFID] [int] NULL,
[AgentPercentage] [decimal] (12, 4) 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,
[InvoiceAmount] [decimal] (12, 4) NULL,
[Quantity] [decimal] (12, 4) NULL,
[Rate] [decimal] (12, 4) NULL,
[RevenueRatingImportHeaderFID] [int] NOT NULL,
[RevenueType] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceFlag] [bit] NULL,
[AddBackFlag] [bit] NULL CONSTRAINT [DF_RevenueRatingImportDetail_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].[RevenueRatingImportDetail] ADD CONSTRAINT [PK_RevenueRatingImportDetail] PRIMARY KEY NONCLUSTERED  ([RevenueRatingImportDetailID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_RevenueRatingImportHeaderFID] ON [dbo].[RevenueRatingImportDetail] ([RevenueRatingImportHeaderFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportDetail] ADD CONSTRAINT [FK_RevenueRatingImportDetail_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[RevenueRatingImportDetail] ADD CONSTRAINT [FK_RevenueRatingImportDetail_PointOfService] FOREIGN KEY ([PointOfServiceFID]) REFERENCES [dbo].[PointOfService] ([PointOfServiceID]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[RevenueRatingImportDetail] ADD CONSTRAINT [FK_RevenueRatingImportDetail_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[RevenueRatingImportDetail] ADD CONSTRAINT [FK_RevenueRatingImportDetail_RevenueRatingImportHeader] FOREIGN KEY ([RevenueRatingImportHeaderFID]) REFERENCES [dbo].[RevenueRatingImportHeader] ([RevenueRatingImportHeaderID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[RevenueRatingImportDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[RevenueRatingImportDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[RevenueRatingImportDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[RevenueRatingImportDetail] TO [MssExec]
GO
Uses
Used By