Tables [dbo].[RevGroups]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)24
Created4:57:09 PM Thursday, September 7, 2006
Last Modified9:19:48 AM Friday, November 8, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_RevGroups: RGPriKeyRGPriKeyint4
No
1 - 1
Indexes IX_RevGroups_Description: DescriptionDescriptionvarchar(128)128
No
Typechar(1)1
Yes
Foreign Keys FK_RevGroups_ItemCode: [dbo].[ItemCode].ICPriKeyICPriKeyint4
Yes
SortOrderint4
Yes
InvoiceFlagvarchar(1)1
Yes
Foreign Keys FK_RevGroups_PreferredRevenueAgent: [dbo].[PreferredRevenueAgent].PreferredRevenueAgentFIDPreferredRevenueAgentFIDint4
Yes
IsStorageRevenueGroupbit1
No
((0))
Inactivebit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_RevGroups: RGPriKeyPK_RevGroupsRGPriKey
Yes
80
IX_RevGroups_DescriptionDescription
Yes
Check Constraints Check Constraints
NameConstraint
CK_RevGroups_IsTheOneStorageRevenueGroup((1)>=[dbo].[GetStorageRevGroupsCount]())
Foreign Keys Foreign Keys
NameColumns
FK_RevGroups_ItemCodeICPriKey->[dbo].[ItemCode].[ICPriKey]
FK_RevGroups_PreferredRevenueAgentPreferredRevenueAgentFID->[dbo].[PreferredRevenueAgent].[PreferredRevenueAgentID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[RevGroups]
(
[RGPriKey] [int] NOT NULL IDENTITY(1, 1),
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Type] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ICPriKey] [int] NULL,
[SortOrder] [int] NULL,
[InvoiceFlag] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PreferredRevenueAgentFID] [int] NULL,
[IsStorageRevenueGroup] [bit] NOT NULL CONSTRAINT [DF_RevGroups_IsStorageRevenueGroup] DEFAULT ((0)),
[Inactive] [bit] NOT NULL CONSTRAINT [DF_RevGroups_Inactive] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevGroups] ADD CONSTRAINT [CK_RevGroups_IsTheOneStorageRevenueGroup] CHECK (((1)>=[dbo].[GetStorageRevGroupsCount]()))
GO
ALTER TABLE [dbo].[RevGroups] ADD CONSTRAINT [PK_RevGroups] PRIMARY KEY CLUSTERED  ([RGPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_RevGroups_Description] ON [dbo].[RevGroups] ([Description]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevGroups] ADD CONSTRAINT [FK_RevGroups_ItemCode] FOREIGN KEY ([ICPriKey]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[RevGroups] ADD CONSTRAINT [FK_RevGroups_PreferredRevenueAgent] FOREIGN KEY ([PreferredRevenueAgentFID]) REFERENCES [dbo].[PreferredRevenueAgent] ([PreferredRevenueAgentID])
GO
GRANT SELECT ON  [dbo].[RevGroups] TO [MssExec]
GRANT INSERT ON  [dbo].[RevGroups] TO [MssExec]
GRANT DELETE ON  [dbo].[RevGroups] TO [MssExec]
GRANT UPDATE ON  [dbo].[RevGroups] TO [MssExec]
GO
Uses
Used By