Tables [dbo].[QuoteGroup]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created5:00:23 PM Monday, April 21, 2008
Last Modified9:07:05 AM Thursday, May 23, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_QuoteGroup: QuoteGroupIDIndexes IX_QuoteGroup_QuoteHeader: QuoteHeaderFID\QuoteGroupIDQuoteGroupIDint4
No
1 - 1
Foreign Keys FK_QuoteGroup_QuoteHeader: [dbo].[QuoteHeader].QuoteHeaderFIDIndexes IX_QuoteGroup_QuoteHeader: QuoteHeaderFID\QuoteGroupIDQuoteHeaderFIDint4
No
Foreign Keys FK_QuoteGroup_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
Yes
Foreign Keys FK_QuoteGroup_RateType: [dbo].[RateTypes].RateTypeFIDRateTypeFIDint4
Yes
Descriptionvarchar(128)128
No
Ratemoney8
Yes
Quantitydecimal(10,4)9
Yes
Quantity2decimal(10,4)9
Yes
Chargemoney8
Yes
Foreign Keys FK_QuoteGroup_QuoteServiceProviderType: [dbo].[QuoteServiceProviderType].QuoteServiceProviderTypeFIDQuoteServiceProviderTypeFIDint4
Yes
VendorIDvarchar(15)15
Yes
VendorQuotedChargemoney8
Yes
VendorActualChargemoney8
Yes
SortOrderint4
Yes
PONumbervarchar(20)20
Yes
InvoiceNumbervarchar(20)20
Yes
ServiceDatedatetime8
Yes
NoteTextvarchar(1024)1024
Yes
Foreign Keys FK_QuoteGroup_LaborRatingTypeFID: [dbo].[LaborRatingType].LaborRatingTypeFIDLaborRatingTypeFIDint4
Yes
Foreign Keys FK_QuoteGroup_QuoteServiceProviderBillToFID: [dbo].[QuoteServiceProviderBillTo].QuoteServiceProviderBillToFIDQuoteServiceProviderBillToFIDint4
Yes
RateSourcevarchar(50)50
Yes
RateSourceRecordint4
Yes
CurrentRowVersiontimestamp8
No
ExternalVendorIDvarchar(15)15
Yes
ExternalVendorNamevarchar(40)40
Yes
IsLockedbit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_QuoteGroup: QuoteGroupIDPK_QuoteGroupQuoteGroupID
Yes
80
IX_QuoteGroup_QuoteHeaderQuoteHeaderFID, QuoteGroupID
Yes
Check Constraints Check Constraints
NameConstraint
CK_QuoteGroup_ServiceProvider_Agent([QuoteServiceProviderTypeFID] IS NULL AND [VendorID] IS NULL OR [QuoteServiceProviderTypeFID] IS NULL AND [VendorID] IS NOT NULL OR [QuoteServiceProviderTypeFID] IS NOT NULL AND [VendorID] IS NULL)
Foreign Keys Foreign Keys
NameColumns
FK_QuoteGroup_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_QuoteGroup_LaborRatingTypeFIDLaborRatingTypeFID->[dbo].[LaborRatingType].[LaborRatingTypeID]
FK_QuoteGroup_QuoteHeaderQuoteHeaderFID->[dbo].[QuoteHeader].[QuoteHeaderID]
FK_QuoteGroup_QuoteServiceProviderBillToFIDQuoteServiceProviderBillToFID->[dbo].[QuoteServiceProviderBillTo].[QuoteServiceProviderBillToID]
FK_QuoteGroup_QuoteServiceProviderTypeQuoteServiceProviderTypeFID->[dbo].[QuoteServiceProviderType].[QuoteServiceProviderTypeID]
FK_QuoteGroup_RateTypeRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[QuoteGroup]
(
[QuoteGroupID] [int] NOT NULL IDENTITY(1, 1),
[QuoteHeaderFID] [int] NOT NULL,
[ItemCodeFID] [int] NULL,
[RateTypeFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Rate] [money] NULL,
[Quantity] [decimal] (10, 4) NULL,
[Quantity2] [decimal] (10, 4) NULL,
[Charge] [money] NULL,
[QuoteServiceProviderTypeFID] [int] NULL,
[VendorID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VendorQuotedCharge] [money] NULL,
[VendorActualCharge] [money] NULL,
[SortOrder] [int] NULL,
[PONumber] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceNumber] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServiceDate] [datetime] NULL,
[NoteText] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LaborRatingTypeFID] [int] NULL,
[QuoteServiceProviderBillToFID] [int] NULL,
[RateSource] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RateSourceRecord] [int] NULL,
[CurrentRowVersion] [timestamp] NOT NULL,
[ExternalVendorID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ExternalVendorName] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsLocked] [bit] NOT NULL CONSTRAINT [DF_QuoteGroup_IsLocked] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [CK_QuoteGroup_ServiceProvider_Agent] CHECK (([QuoteServiceProviderTypeFID] IS NULL AND [VendorID] IS NULL OR [QuoteServiceProviderTypeFID] IS NULL AND [VendorID] IS NOT NULL OR [QuoteServiceProviderTypeFID] IS NOT NULL AND [VendorID] IS NULL))
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [PK_QuoteGroup] PRIMARY KEY NONCLUSTERED  ([QuoteGroupID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_QuoteGroup_QuoteHeader] ON [dbo].[QuoteGroup] ([QuoteHeaderFID], [QuoteGroupID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [FK_QuoteGroup_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [FK_QuoteGroup_LaborRatingTypeFID] FOREIGN KEY ([LaborRatingTypeFID]) REFERENCES [dbo].[LaborRatingType] ([LaborRatingTypeID])
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [FK_QuoteGroup_QuoteHeader] FOREIGN KEY ([QuoteHeaderFID]) REFERENCES [dbo].[QuoteHeader] ([QuoteHeaderID])
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [FK_QuoteGroup_QuoteServiceProviderBillToFID] FOREIGN KEY ([QuoteServiceProviderBillToFID]) REFERENCES [dbo].[QuoteServiceProviderBillTo] ([QuoteServiceProviderBillToID])
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [FK_QuoteGroup_QuoteServiceProviderType] FOREIGN KEY ([QuoteServiceProviderTypeFID]) REFERENCES [dbo].[QuoteServiceProviderType] ([QuoteServiceProviderTypeID])
GO
ALTER TABLE [dbo].[QuoteGroup] ADD CONSTRAINT [FK_QuoteGroup_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey])
GO
GRANT SELECT ON  [dbo].[QuoteGroup] TO [MssExec]
GRANT INSERT ON  [dbo].[QuoteGroup] TO [MssExec]
GRANT DELETE ON  [dbo].[QuoteGroup] TO [MssExec]
GRANT UPDATE ON  [dbo].[QuoteGroup] TO [MssExec]
GO
Uses
Used By