Tables [dbo].[ServType]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)1959
Created4:57:08 PM Thursday, September 7, 2006
Last Modified9:10:52 AM Thursday, May 23, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_ServType: ServiceIDServiceIDint4
No
1 - 1
Indexes IX_ServType_BranchPriKey_Service: BranchPriKey\ServiceServicevarchar(30)30
Yes
LaborTypevarchar(20)20
Yes
UnitsPerHourint4
Yes
Foreign Keys FK_ServType_ItemCode: [dbo].[ItemCode].ICPriKeyICPriKeyint4
Yes
Foreign Keys FK_ServType_BRANCH: [dbo].[Branch].BranchPriKeyIndexes IX_ServType_BranchPriKey_Service: BranchPriKey\ServiceBranchPriKeyint4
No
Foreign Keys FK_ServType_ServTypeGroup: [dbo].[ServTypeGroup].ServTypeGPriKeyServTypeGPriKeyint4
Yes
StorageFlagInsmallint2
Yes
(0)
StorageFlagOutsmallint2
Yes
(0)
ManualEntryHoursFlagsmallint2
Yes
(0)
ContainerizationEligibleFlagbit1
No
((0))
Inactivebit1
No
((0))
Foreign Keys FK_ServType_ServTypeClass: [dbo].[ServTypeClass].ServTypeClassFIDServTypeClassFIDint4
Yes
AvailableToOrderInformationbit1
No
((0))
AvailableToInternationalbit1
No
((0))
AvailableToSpecialServicesbit1
No
((0))
AvailableToOfficeIndustrialbit1
No
((0))
Foreign Keys FK_ServType_UnitType: [dbo].[UnitType].UnitTypeFIDUnitTypeFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_ServType: ServiceIDPK_ServTypeServiceID
Yes
80
IX_ServType_BranchPriKey_ServiceBranchPriKey, Service
Foreign Keys Foreign Keys
NameColumns
FK_ServType_BRANCHBranchPriKey->[dbo].[Branch].[BranchPriKey]
FK_ServType_ItemCodeICPriKey->[dbo].[ItemCode].[ICPriKey]
FK_ServType_ServTypeClassServTypeClassFID->[dbo].[ServTypeClass].[ServTypeClassID]
FK_ServType_ServTypeGroupServTypeGPriKey->[dbo].[ServTypeGroup].[ServiceTypeGPriKey]
FK_ServType_UnitTypeUnitTypeFID->[dbo].[UnitType].[UnitTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ServType]
(
[ServiceID] [int] NOT NULL IDENTITY(1, 1),
[Service] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LaborType] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UnitsPerHour] [int] NULL,
[ICPriKey] [int] NULL,
[BranchPriKey] [int] NOT NULL,
[ServTypeGPriKey] [int] NULL,
[StorageFlagIn] [smallint] NULL CONSTRAINT [DF_ServType_StorageFlagIn] DEFAULT (0),
[StorageFlagOut] [smallint] NULL CONSTRAINT [DF_ServType_StorageFlagOut] DEFAULT (0),
[ManualEntryHoursFlag] [smallint] NULL CONSTRAINT [DF_ServType_ManualEntryHoursFlag] DEFAULT (0),
[ContainerizationEligibleFlag] [bit] NOT NULL CONSTRAINT [DF_ServType_ContainerizationEligibleFlag] DEFAULT ((0)),
[Inactive] [bit] NOT NULL CONSTRAINT [DF_ServType_Inactive] DEFAULT ((0)),
[ServTypeClassFID] [int] NULL,
[AvailableToOrderInformation] [bit] NOT NULL CONSTRAINT [DF_ServType_AvailableToOrderInformation] DEFAULT ((0)),
[AvailableToInternational] [bit] NOT NULL CONSTRAINT [DF_ServType_AvailableToInternational] DEFAULT ((0)),
[AvailableToSpecialServices] [bit] NOT NULL CONSTRAINT [DF_ServType_AvailableToSpecialServices] DEFAULT ((0)),
[AvailableToOfficeIndustrial] [bit] NOT NULL CONSTRAINT [DF_ServType_AvailableToOfficeIndustrial] DEFAULT ((0)),
[UnitTypeFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ServType] ADD CONSTRAINT [PK_ServType] PRIMARY KEY CLUSTERED  ([ServiceID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ServType_BranchPriKey_Service] ON [dbo].[ServType] ([BranchPriKey], [Service]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ServType] ADD CONSTRAINT [FK_ServType_BRANCH] FOREIGN KEY ([BranchPriKey]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[ServType] ADD CONSTRAINT [FK_ServType_ItemCode] FOREIGN KEY ([ICPriKey]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[ServType] ADD CONSTRAINT [FK_ServType_ServTypeClass] FOREIGN KEY ([ServTypeClassFID]) REFERENCES [dbo].[ServTypeClass] ([ServTypeClassID])
GO
ALTER TABLE [dbo].[ServType] ADD CONSTRAINT [FK_ServType_ServTypeGroup] FOREIGN KEY ([ServTypeGPriKey]) REFERENCES [dbo].[ServTypeGroup] ([ServiceTypeGPriKey])
GO
ALTER TABLE [dbo].[ServType] ADD CONSTRAINT [FK_ServType_UnitType] FOREIGN KEY ([UnitTypeFID]) REFERENCES [dbo].[UnitType] ([UnitTypeID])
GO
GRANT SELECT ON  [dbo].[ServType] TO [MssExec]
GRANT INSERT ON  [dbo].[ServType] TO [MssExec]
GRANT DELETE ON  [dbo].[ServType] TO [MssExec]
GRANT UPDATE ON  [dbo].[ServType] TO [MssExec]
GO
Uses
Used By