Tables [dbo].[BillingMajorItem]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)93549
Created4:57:09 PM Thursday, September 7, 2006
Last Modified1:57:10 PM Wednesday, April 10, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_BillingMajorItem: BMajPriKeyIndexes IX_BillingMajorItem_ExtraStopFID: BMajPriKey\ExtraStopFIDBMajPriKeyint4
No
1 - 1
Foreign Keys FK_BillingMajorItem_AccountingNote: [dbo].[AccountingNote].ANPriKeyIndexes IX_BillingMajorItem_ANPriKey: ANPriKeyANPriKeyint4
Yes
InvoiceFlagvarchar(1)1
Yes
Descriptionvarchar(128)128
Yes
Amountmoney8
Yes
(0)
Cluster Key IX_BillingMajorItem_OrdPriKey: OrdPriKeyForeign Keys FK_BillingMajorItem_ORDERS: [dbo].[Orders].OrdPriKeyOrdPriKeyint4
No
GrossAmountmoney8
Yes
(0)
Discountfloat8
Yes
(0)
Foreign Keys FK_BillingMajorItem_RevGroups: [dbo].[RevGroups].RevGroupPriKeyRevGroupPriKeyint4
Yes
Foreign Keys FK_BillingMajorItem_LocServ: [dbo].[LocServ].LSPriKeyIndexes IX_BillingMajorItem_LSPrikey: LSPriKeyLSPriKeyint4
Yes
Indexes IX_BillingMajorItem_IHPriKey: IHPriKeyIHPriKeyint4
Yes
ReductionAmountdecimal(12,2)9
Yes
ReducedInvoiceAmountdecimal(12,2)9
Yes
Foreign Keys FK_BillingMajorItem_CustomerInvoiceReportEDIItem: [dbo].[CustomerInvoiceReportEDIItem].CustomerInvoiceReportEDIItemFIDCustomerInvoiceReportEDIItemFIDint4
Yes
Foreign Keys FK_BillingMajorItem_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
Yes
Foreign Keys FK_BillingMajorItem_RateType: [dbo].[RateTypes].RateTypeFIDRateTypeFIDint4
Yes
Quantityfloat8
Yes
Quantity2float8
Yes
Ratefloat8
Yes
Foreign Keys FK_BillingMajorItem_PointOfService: [dbo].[PointOfService].PointOfServiceFIDPointOfServiceFIDint4
Yes
Foreign Keys FK_BillingMajorItem_ExtraStop: [dbo].[XtraStop].ExtraStopFIDIndexes IX_BillingMajorItem_ExtraStopFID: BMajPriKey\ExtraStopFIDExtraStopFIDint4
Yes
Foreign Keys FK_BillingMajorItem_LaborRatingTypeFID: [dbo].[LaborRatingType].LaborRatingTypeFIDLaborRatingTypeFIDint4
Yes
RateSourcevarchar(50)50
Yes
RateSourceRecordint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_BillingMajorItem: BMajPriKeyPK_BillingMajorItemBMajPriKey
Yes
80
IX_BillingMajorItem_ANPriKeyANPriKey
IX_BillingMajorItem_ExtraStopFIDBMajPriKey, ExtraStopFID
IX_BillingMajorItem_IHPriKeyIHPriKey80
IX_BillingMajorItem_LSPrikeyLSPriKey
Cluster Key IX_BillingMajorItem_OrdPriKey: OrdPriKeyIX_BillingMajorItem_OrdPriKeyOrdPriKey80
Foreign Keys Foreign Keys
NameColumns
FK_BillingMajorItem_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_BillingMajorItem_CustomerInvoiceReportEDIItemCustomerInvoiceReportEDIItemFID->[dbo].[CustomerInvoiceReportEDIItem].[CustomerInvoiceReportEDIItemID]
FK_BillingMajorItem_ExtraStopExtraStopFID->[dbo].[XtraStop].[PriKey]
FK_BillingMajorItem_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_BillingMajorItem_LaborRatingTypeFIDLaborRatingTypeFID->[dbo].[LaborRatingType].[LaborRatingTypeID]
FK_BillingMajorItem_LocServLSPriKey->[dbo].[LocServ].[PriKey]
FK_BillingMajorItem_ORDERSOrdPriKey->[dbo].[Orders].[PriKey]
FK_BillingMajorItem_PointOfServicePointOfServiceFID->[dbo].[PointOfService].[PointOfServiceID]
FK_BillingMajorItem_RateTypeRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
FK_BillingMajorItem_RevGroupsRevGroupPriKey->[dbo].[RevGroups].[RGPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BillingMajorItem]
(
[BMajPriKey] [int] NOT NULL IDENTITY(1, 1),
[ANPriKey] [int] NULL,
[InvoiceFlag] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Amount] [money] NULL CONSTRAINT [DF_BillingMajorItem_Amount] DEFAULT (0),
[OrdPriKey] [int] NOT NULL,
[GrossAmount] [money] NULL CONSTRAINT [DF_BillingMajorItem_GrossAmount] DEFAULT (0),
[Discount] [float] NULL CONSTRAINT [DF_BillingMajorItem_Discount] DEFAULT (0),
[RevGroupPriKey] [int] NULL,
[LSPriKey] [int] NULL,
[IHPriKey] [int] NULL,
[ReductionAmount] [decimal] (12, 2) NULL,
[ReducedInvoiceAmount] [decimal] (12, 2) NULL,
[CustomerInvoiceReportEDIItemFID] [int] NULL,
[ItemCodeFID] [int] NULL,
[RateTypeFID] [int] NULL,
[Quantity] [float] NULL,
[Quantity2] [float] NULL,
[Rate] [float] NULL,
[PointOfServiceFID] [int] NULL,
[ExtraStopFID] [int] NULL,
[LaborRatingTypeFID] [int] NULL,
[RateSource] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RateSourceRecord] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [PK_BillingMajorItem] PRIMARY KEY NONCLUSTERED  ([BMajPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMajorItem_ANPriKey] ON [dbo].[BillingMajorItem] ([ANPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMajorItem_ExtraStopFID] ON [dbo].[BillingMajorItem] ([ExtraStopFID]) INCLUDE ([BMajPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMajorItem_IHPriKey] ON [dbo].[BillingMajorItem] ([IHPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMajorItem_LSPrikey] ON [dbo].[BillingMajorItem] ([LSPriKey]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_BillingMajorItem_OrdPriKey] ON [dbo].[BillingMajorItem] ([OrdPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_CustomerInvoiceReportEDIItem] FOREIGN KEY ([CustomerInvoiceReportEDIItemFID]) REFERENCES [dbo].[CustomerInvoiceReportEDIItem] ([CustomerInvoiceReportEDIItemID])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_ExtraStop] FOREIGN KEY ([ExtraStopFID]) REFERENCES [dbo].[XtraStop] ([PriKey])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_LaborRatingTypeFID] FOREIGN KEY ([LaborRatingTypeFID]) REFERENCES [dbo].[LaborRatingType] ([LaborRatingTypeID])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_LocServ] FOREIGN KEY ([LSPriKey]) REFERENCES [dbo].[LocServ] ([PriKey])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_ORDERS] FOREIGN KEY ([OrdPriKey]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_PointOfService] FOREIGN KEY ([PointOfServiceFID]) REFERENCES [dbo].[PointOfService] ([PointOfServiceID])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey])
GO
ALTER TABLE [dbo].[BillingMajorItem] ADD CONSTRAINT [FK_BillingMajorItem_RevGroups] FOREIGN KEY ([RevGroupPriKey]) REFERENCES [dbo].[RevGroups] ([RGPriKey])
GO
GRANT SELECT ON  [dbo].[BillingMajorItem] TO [MssExec]
GRANT INSERT ON  [dbo].[BillingMajorItem] TO [MssExec]
GRANT DELETE ON  [dbo].[BillingMajorItem] TO [MssExec]
GRANT UPDATE ON  [dbo].[BillingMajorItem] TO [MssExec]
GO
Uses
Used By