Tables [dbo].[QuoteHeader]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created5:00:23 PM Monday, April 21, 2008
Last Modified7:28:59 PM Thursday, August 29, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_QuoteHeader: QuoteHeaderIDIndexes IX_QuoteHeader_Orders: OrdersFID\QuoteHeaderIDQuoteHeaderIDint4
No
1 - 1
Indexes IX_QuoteHeader_Orders: OrdersFID\QuoteHeaderIDOrdersFIDint4
No
CreatedDatedatetime8
Yes
CreatedBySysuserFIDint4
Yes
Foreign Keys FK_QuoteHeader_QuoteStatus: [dbo].[QuoteStatus].QuoteStatusFIDQuoteStatusFIDint4
No
FirstTimeAcceptedbit1
No
((0))
VanLineLinkedbit1
No
((0))
Foreign Keys FK_QuoteHeader_OrderContact: [dbo].[OrderContacts].OrderContactFIDOrderContactFIDint4
Yes
Descriptionvarchar(64)64
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_QuoteHeader: QuoteHeaderIDPK_QuoteHeaderQuoteHeaderID
Yes
80
IX_QuoteHeader_OrdersOrdersFID, QuoteHeaderID
Yes
Check Constraints Check Constraints
NameConstraint
CK_QuoteHeader_OnlyOneVanLineLinked((1)=[dbo].[IsOnlyOneVanLineLinked]([QuoteHeaderID],[OrdersFID],[VanLineLinked]))
Foreign Keys Foreign Keys
NameColumns
FK_QuoteHeader_OrderContactOrderContactFID->[dbo].[OrderContacts].[OrderContactID]
FK_QuoteHeader_QuoteStatusQuoteStatusFID->[dbo].[QuoteStatus].[QuoteStatusID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[QuoteHeader]
(
[QuoteHeaderID] [int] NOT NULL IDENTITY(1, 1),
[OrdersFID] [int] NOT NULL,
[CreatedDate] [datetime] NULL,
[CreatedBySysuserFID] [int] NULL,
[QuoteStatusFID] [int] NOT NULL,
[FirstTimeAccepted] [bit] NOT NULL CONSTRAINT [DF_QuoteHeader_FirstTimeAccepted] DEFAULT ((0)),
[VanLineLinked] [bit] NOT NULL CONSTRAINT [DF_QuoteHeader_VanLineLinked] DEFAULT ((0)),
[OrderContactFID] [int] NULL,
[Description] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteHeader] ADD CONSTRAINT [CK_QuoteHeader_OnlyOneVanLineLinked] CHECK (((1)=[dbo].[IsOnlyOneVanLineLinked]([QuoteHeaderID],[OrdersFID],[VanLineLinked])))
GO
ALTER TABLE [dbo].[QuoteHeader] ADD CONSTRAINT [PK_QuoteHeader] PRIMARY KEY NONCLUSTERED  ([QuoteHeaderID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_QuoteHeader_Orders] ON [dbo].[QuoteHeader] ([OrdersFID], [QuoteHeaderID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteHeader] ADD CONSTRAINT [FK_QuoteHeader_OrderContact] FOREIGN KEY ([OrderContactFID]) REFERENCES [dbo].[OrderContacts] ([OrderContactID])
GO
ALTER TABLE [dbo].[QuoteHeader] ADD CONSTRAINT [FK_QuoteHeader_QuoteStatus] FOREIGN KEY ([QuoteStatusFID]) REFERENCES [dbo].[QuoteStatus] ([QuoteStatusID])
GO
GRANT SELECT ON  [dbo].[QuoteHeader] TO [MssExec]
GRANT INSERT ON  [dbo].[QuoteHeader] TO [MssExec]
GRANT DELETE ON  [dbo].[QuoteHeader] TO [MssExec]
GRANT UPDATE ON  [dbo].[QuoteHeader] TO [MssExec]
GO
Uses
Used By