Tables [dbo].[SysUserLaborTypeCPMaster]
Properties
PropertyValue
Row Count (~)61
Created12:32:29 PM Monday, August 4, 2014
Last Modified12:32:36 PM Monday, August 4, 2014
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_SysUserLaborTypeCPMaster: SysUserLaborTypeCPMasterIDSysUserLaborTypeCPMasterIDint4
No
1 - 1
Foreign Keys FK_SysUserLaborTypeCPMaster_SysUserLaborTypeMap: [dbo].[SysUserLaborTypeMap].SysUserLaborTypeMapFIDIndexes IX_SysUserLaborTypeCPMaster_SysUserLaborTypeMapFID_CPMasterFID_EffectiveStartDate_EffectiveEndDate: SysUserLaborTypeMapFID\CPMasterFID\EffectiveStartDate\EffectiveEndDateSysUserLaborTypeMapFIDint4
No
Foreign Keys FK_SysUserLaborTypeCPMaster_CPMaster: [dbo].[CPMaster].CPMasterFIDIndexes IX_SysUserLaborTypeCPMaster_SysUserLaborTypeMapFID_CPMasterFID_EffectiveStartDate_EffectiveEndDate: SysUserLaborTypeMapFID\CPMasterFID\EffectiveStartDate\EffectiveEndDateCPMasterFIDint4
No
Indexes IX_SysUserLaborTypeCPMaster_SysUserLaborTypeMapFID_CPMasterFID_EffectiveStartDate_EffectiveEndDate: SysUserLaborTypeMapFID\CPMasterFID\EffectiveStartDate\EffectiveEndDateEffectiveStartDatedate3
Yes
Indexes IX_SysUserLaborTypeCPMaster_SysUserLaborTypeMapFID_CPMasterFID_EffectiveStartDate_EffectiveEndDate: SysUserLaborTypeMapFID\CPMasterFID\EffectiveStartDate\EffectiveEndDateEffectiveEndDatedate3
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_SysUserLaborTypeCPMaster: SysUserLaborTypeCPMasterIDPK_SysUserLaborTypeCPMasterSysUserLaborTypeCPMasterID
Yes
IX_SysUserLaborTypeCPMaster_SysUserLaborTypeMapFID_CPMasterFID_EffectiveStartDate_EffectiveEndDateSysUserLaborTypeMapFID, CPMasterFID, EffectiveStartDate, EffectiveEndDate
Check Constraints Check Constraints
NameConstraint
CK_SysUserLaborTypeCPMaster_DateRange(NOT ([EffectiveStartDate] IS NOT NULL AND [EffectiveEndDate] IS NOT NULL AND [EffectiveStartDate]>[EffectiveEndDate]))
CK_SysUserLaborTypeCPMaster_SysUser_DateRange((1)=[dbo].[IsCommissionPlanMasterDateRangeUnique]([SysUserLaborTypeMapFID],[EffectiveStartDate],[EffectiveEndDate]))
Foreign Keys Foreign Keys
NameColumns
FK_SysUserLaborTypeCPMaster_CPMasterCPMasterFID->[dbo].[CPMaster].[CPPriKey]
FK_SysUserLaborTypeCPMaster_SysUserLaborTypeMapSysUserLaborTypeMapFID->[dbo].[SysUserLaborTypeMap].[SysUserLaborTypeMapID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SysUserLaborTypeCPMaster]
(
[SysUserLaborTypeCPMasterID] [int] NOT NULL IDENTITY(1, 1),
[SysUserLaborTypeMapFID] [int] NOT NULL,
[CPMasterFID] [int] NOT NULL,
[EffectiveStartDate] [date] NULL,
[EffectiveEndDate] [date] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysUserLaborTypeCPMaster] ADD CONSTRAINT [CK_SysUserLaborTypeCPMaster_DateRange] CHECK ((NOT ([EffectiveStartDate] IS NOT NULL AND [EffectiveEndDate] IS NOT NULL AND [EffectiveStartDate]>[EffectiveEndDate])))
GO
ALTER TABLE [dbo].[SysUserLaborTypeCPMaster] ADD CONSTRAINT [CK_SysUserLaborTypeCPMaster_SysUser_DateRange] CHECK (((1)=[dbo].[IsCommissionPlanMasterDateRangeUnique]([SysUserLaborTypeMapFID],[EffectiveStartDate],[EffectiveEndDate])))
GO
ALTER TABLE [dbo].[SysUserLaborTypeCPMaster] ADD CONSTRAINT [PK_SysUserLaborTypeCPMaster] PRIMARY KEY CLUSTERED  ([SysUserLaborTypeCPMasterID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SysUserLaborTypeCPMaster_SysUserLaborTypeMapFID_CPMasterFID_EffectiveStartDate_EffectiveEndDate] ON [dbo].[SysUserLaborTypeCPMaster] ([SysUserLaborTypeMapFID], [CPMasterFID], [EffectiveStartDate] DESC, [EffectiveEndDate] DESC) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysUserLaborTypeCPMaster] ADD CONSTRAINT [FK_SysUserLaborTypeCPMaster_CPMaster] FOREIGN KEY ([CPMasterFID]) REFERENCES [dbo].[CPMaster] ([CPPriKey])
GO
ALTER TABLE [dbo].[SysUserLaborTypeCPMaster] ADD CONSTRAINT [FK_SysUserLaborTypeCPMaster_SysUserLaborTypeMap] FOREIGN KEY ([SysUserLaborTypeMapFID]) REFERENCES [dbo].[SysUserLaborTypeMap] ([SysUserLaborTypeMapID])
GO
GRANT SELECT ON  [dbo].[SysUserLaborTypeCPMaster] TO [MssExec]
GRANT INSERT ON  [dbo].[SysUserLaborTypeCPMaster] TO [MssExec]
GRANT DELETE ON  [dbo].[SysUserLaborTypeCPMaster] TO [MssExec]
GRANT UPDATE ON  [dbo].[SysUserLaborTypeCPMaster] TO [MssExec]
GO
Uses