Tables [dbo].[ItemCode]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)618
Created4:57:07 PM Thursday, September 7, 2006
Last Modified7:37:05 PM Thursday, August 29, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_ItemCode: ICPriKeyICPriKeyint4
No
1 - 1
Cluster Key IX_ItemCode: ItemCodeItemCodeint4
No
Descriptionvarchar(128)128
Yes
DiscountGroupvarchar(3)3
Yes
QuantityOnHandint4
Yes
Costmoney8
Yes
Foreign Keys FK_ItemCode_RevGroups: [dbo].[RevGroups].RGPriKeyRGPriKeyint4
Yes
Invoicechar(10)10
Yes
InvoiceOrderint4
Yes
Foreign Keys FK_ItemCode_InvoiceGroup: [dbo].[InvoiceGroup].IGPriKeyIGPriKeyint4
Yes
AvgRevenuemoney8
Yes
CPUItemvarchar(1)1
Yes
Foreign Keys FK_ItemCode_ServiceCode: [dbo].[ServiceCode].ServiceCodePriKeyServiceCodePriKeyint4
Yes
GLGroupint4
Yes
Foreign Keys FK_ItemCode_PreferredRevenueAgent: [dbo].[PreferredRevenueAgent].PreferredRevenueAgentFIDPreferredRevenueAgentFIDint4
Yes
Foreign Keys FK_ItemCode_PointOfService: [dbo].[PointOfService].PointOfServiceFIDPointOfServiceFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_ItemCode: ICPriKeyPK_ItemCodeICPriKey
Yes
80
Cluster Key IX_ItemCode: ItemCodeIX_ItemCodeItemCode
Yes
80
Foreign Keys Foreign Keys
NameColumns
FK_ItemCode_InvoiceGroupIGPriKey->[dbo].[InvoiceGroup].[IGPriKey]
FK_ItemCode_PointOfServicePointOfServiceFID->[dbo].[PointOfService].[PointOfServiceID]
FK_ItemCode_PreferredRevenueAgentPreferredRevenueAgentFID->[dbo].[PreferredRevenueAgent].[PreferredRevenueAgentID]
FK_ItemCode_RevGroupsRGPriKey->[dbo].[RevGroups].[RGPriKey]
FK_ItemCode_ServiceCodeServiceCodePriKey->[dbo].[ServiceCode].[ServiceCodePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ItemCode]
(
[ICPriKey] [int] NOT NULL IDENTITY(1, 1),
[ItemCode] [int] NOT NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DiscountGroup] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[QuantityOnHand] [int] NULL,
[Cost] [money] NULL,
[RGPriKey] [int] NULL,
[Invoice] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceOrder] [int] NULL,
[IGPriKey] [int] NULL,
[AvgRevenue] [money] NULL,
[CPUItem] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServiceCodePriKey] [int] NULL,
[GLGroup] [int] NULL,
[PreferredRevenueAgentFID] [int] NULL,
[PointOfServiceFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemCode] ADD CONSTRAINT [PK_ItemCode] PRIMARY KEY NONCLUSTERED  ([ICPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemCode] ADD CONSTRAINT [IX_ItemCode] UNIQUE CLUSTERED  ([ItemCode]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemCode] ADD CONSTRAINT [FK_ItemCode_InvoiceGroup] FOREIGN KEY ([IGPriKey]) REFERENCES [dbo].[InvoiceGroup] ([IGPriKey])
GO
ALTER TABLE [dbo].[ItemCode] ADD CONSTRAINT [FK_ItemCode_PointOfService] FOREIGN KEY ([PointOfServiceFID]) REFERENCES [dbo].[PointOfService] ([PointOfServiceID])
GO
ALTER TABLE [dbo].[ItemCode] ADD CONSTRAINT [FK_ItemCode_PreferredRevenueAgent] FOREIGN KEY ([PreferredRevenueAgentFID]) REFERENCES [dbo].[PreferredRevenueAgent] ([PreferredRevenueAgentID])
GO
ALTER TABLE [dbo].[ItemCode] ADD CONSTRAINT [FK_ItemCode_RevGroups] FOREIGN KEY ([RGPriKey]) REFERENCES [dbo].[RevGroups] ([RGPriKey])
GO
ALTER TABLE [dbo].[ItemCode] ADD CONSTRAINT [FK_ItemCode_ServiceCode] FOREIGN KEY ([ServiceCodePriKey]) REFERENCES [dbo].[ServiceCode] ([ServiceCodePriKey])
GO
GRANT SELECT ON  [dbo].[ItemCode] TO [MssExec]
GRANT INSERT ON  [dbo].[ItemCode] TO [MssExec]
GRANT DELETE ON  [dbo].[ItemCode] TO [MssExec]
GRANT UPDATE ON  [dbo].[ItemCode] TO [MssExec]
GO
Uses
Used By