Tables [dbo].[LocServ]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)42655
Created4:57:07 PM Thursday, September 7, 2006
Last Modified9:14:52 AM Thursday, May 23, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_LOCSERV: PriKeyIndexes IX_LocServ_DestXtraStopFID: PriKey\DestXtraStopFIDIndexes IX_LocServ_OriginXtraStopFID: PriKey\OriginXtraStopFIDIndexes IX_LocServ_ServiceDate: ServiceDate\PriKeyStatistics STAT_LocServ_ServiceData: ServiceDate\PriKeyPriKeyint4
No
1 - 1
Foreign Keys FK_LOCSERV_ORDERS: [dbo].[Orders].OrdPriKeyIndexes IX_LocServ_OrdPriKey: OrdPriKeyOrdPriKeyint4
No
Indexes IX_LocServ_BranchPriKey_ServiceDate: BranchPriKey\ServiceDateIndexes IX_LocServ_ServiceDate: ServiceDate\PriKeyStatistics STAT_LocServ_ServiceData: ServiceDate\PriKeyServiceDatedatetime8
Yes
WkTicketNovarchar(32)32
Yes
Foreign Keys FK_LOCSERV_ServType: [dbo].[ServType].ServiceIDServiceIDint4
No
JobStartdatetime8
Yes
JobEnddatetime8
Yes
TotCrewHrsdecimal(10,2)9
Yes
HrsPerMandecimal(10,2)9
Yes
Indexes IX_LocServ_Branch_ServStatus: SubmittedOn\BranchPriKey\ServStatusServStatussmallint2
Yes
HrsDrv1Waydecimal(10,2)9
Yes
Quantityint4
Yes
Crewint4
Yes
OriginDestinationvarchar(1)1
Yes
CreatedOndatetime8
No
Foreign Keys FK_LOCSERV_Sysuser: [dbo].[Sysuser].CreatedByIndexes IX_LocServ_CreatedBy: CreatedByCreatedByint4
No
LastEditedOndatetime8
Yes
Foreign Keys FK_LOCSERV_Sysuser1: [dbo].[Sysuser].LastEditedByIndexes IX_LocServ_LastEditedBy: LastEditedByLastEditedByint4
Yes
Indexes IX_LocServ_Branch_ServStatus: SubmittedOn\BranchPriKey\ServStatusSubmittedOndatetime8
Yes
Foreign Keys FK_LOCSERV_Sysuser2: [dbo].[Sysuser].SubmittedByIndexes IX_LocServ_SubmittedBy: SubmittedBySubmittedByint4
Yes
ClearedOndatetime8
Yes
Foreign Keys FK_LOCSERV_Sysuser3: [dbo].[Sysuser].ClearedByIndexes IX_LocServ_ClearedBy: ClearedByClearedByint4
Yes
Foreign Keys FK_LOCSERV_BRANCH: [dbo].[Branch].BranchPriKeyIndexes IX_LocServ_BranchPriKey_ServiceDate: BranchPriKey\ServiceDateIndexes IX_LocServ_Branch_ServStatus: SubmittedOn\BranchPriKey\ServStatusBranchPriKeyint4
No
Foreign Keys FK_LOCSERV_XtraStop1: [dbo].[XtraStop].OriginXtraStopFIDIndexes IX_LocServ_OriginXtraStopFID: PriKey\OriginXtraStopFIDOriginXtraStopFIDint4
Yes
Foreign Keys FK_LOCSERV_XtraStop2: [dbo].[XtraStop].DestXtraStopFIDIndexes IX_LocServ_DestXtraStopFID: PriKey\DestXtraStopFIDDestXtraStopFIDint4
Yes
Foreign Keys FK_LOCSERV_DispatchStatusFID: [dbo].[DispatchStatus].DispatchStatusFIDDispatchStatusFIDint4
Yes
Foreign Keys FK_LOCSERV_ContainerizationStatus: [dbo].[ContainerizationStatus].ContainerizationStatusFIDContainerizationStatusFIDint4
Yes
VoidedByint4
Yes
VoidedOndatetime8
Yes
Check Constraints CK_CartonCountSource : ([CartonCountSource]='S' OR [CartonCountSource]='O' OR [CartonCountSource]='M')CartonCountSourcevarchar(1)1
Yes
Foreign Keys FK_LOCSERV_Sysuser4: [dbo].[Sysuser].CancelledByCancelledByint4
Yes
CancelledOndatetime8
Yes
RequestedStartTimedatetime8
Yes
RequestedEndTimedatetime8
Yes
Foreign Keys FK_LOCSERV_OperationalPlan: [dbo].[OperationalPlan].OperationalPlanFIDIndexes IX_LocServ_OperationalPlanFID: OperationalPlanFIDOperationalPlanFIDint4
Yes
Foreign Keys FK_LOCSERV_OrderLocations1: [dbo].[OrderLocations].OriginOrderLocationFIDOriginOrderLocationFIDint4
Yes
Foreign Keys FK_LOCSERV_OrderLocations2: [dbo].[OrderLocations].DestinationOrderLocationFIDDestinationOrderLocationFIDint4
Yes
Sort1varchar(64)64
Yes
Sort2varchar(16)16
Yes
CrewReportTimedatetime8
Yes
Foreign Keys FK_LOCSERV_CrewReportLocation: [dbo].[CrewReportLocation].CrewReportLocationFIDCrewReportLocationFIDint4
Yes
IsPlaceHolderbit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_LOCSERV: PriKeyPK_LOCSERVPriKey
Yes
80
IX_LocServ_Branch_ServStatusSubmittedOn, BranchPriKey, ServStatus
IX_LocServ_BranchPriKey_ServiceDateBranchPriKey, ServiceDate
IX_LocServ_ClearedByClearedBy
IX_LocServ_CreatedByCreatedBy
IX_LocServ_DestXtraStopFIDPriKey, DestXtraStopFID
IX_LocServ_LastEditedByLastEditedBy
IX_LocServ_OperationalPlanFIDOperationalPlanFID
IX_LocServ_OrdPriKeyOrdPriKey80
IX_LocServ_OriginXtraStopFIDPriKey, OriginXtraStopFID
IX_LocServ_ServiceDateServiceDate, PriKey
IX_LocServ_SubmittedBySubmittedBy
Statistics Statistics
NameColumns
STAT_LocServ_ServiceDataServiceDate, PriKey
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_CartonCountSourceCartonCountSource([CartonCountSource]='S' OR [CartonCountSource]='O' OR [CartonCountSource]='M')
Foreign Keys Foreign Keys
NameColumns
FK_LOCSERV_BRANCHBranchPriKey->[dbo].[Branch].[BranchPriKey]
FK_LOCSERV_Sysuser4CancelledBy->[dbo].[Sysuser].[SysUserID]
FK_LOCSERV_Sysuser3ClearedBy->[dbo].[Sysuser].[SysUserID]
FK_LOCSERV_ContainerizationStatusContainerizationStatusFID->[dbo].[ContainerizationStatus].[ContainerizationStatusID]
FK_LOCSERV_SysuserCreatedBy->[dbo].[Sysuser].[SysUserID]
FK_LOCSERV_CrewReportLocationCrewReportLocationFID->[dbo].[CrewReportLocation].[CrewReportLocationID]
FK_LOCSERV_OrderLocations2DestinationOrderLocationFID->[dbo].[OrderLocations].[OrderLocationID]
FK_LOCSERV_XtraStop2DestXtraStopFID->[dbo].[XtraStop].[PriKey]
FK_LOCSERV_DispatchStatusFIDDispatchStatusFID->[dbo].[DispatchStatus].[DispatchStatusID]
FK_LOCSERV_Sysuser1LastEditedBy->[dbo].[Sysuser].[SysUserID]
FK_LOCSERV_OperationalPlanOperationalPlanFID->[dbo].[OperationalPlan].[OperationalPlanID]
FK_LOCSERV_ORDERSOrdPriKey->[dbo].[Orders].[PriKey]
FK_LOCSERV_OrderLocations1OriginOrderLocationFID->[dbo].[OrderLocations].[OrderLocationID]
FK_LOCSERV_XtraStop1OriginXtraStopFID->[dbo].[XtraStop].[PriKey]
FK_LOCSERV_ServTypeServiceID->[dbo].[ServType].[ServiceID]
FK_LOCSERV_Sysuser2SubmittedBy->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[LocServ]
(
[PriKey] [int] NOT NULL IDENTITY(1, 1),
[OrdPriKey] [int] NOT NULL,
[ServiceDate] [datetime] NULL,
[WkTicketNo] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServiceID] [int] NOT NULL,
[JobStart] [datetime] NULL,
[JobEnd] [datetime] NULL,
[TotCrewHrs] [decimal] (10, 2) NULL,
[HrsPerMan] [decimal] (10, 2) NULL,
[ServStatus] [smallint] NULL,
[HrsDrv1Way] [decimal] (10, 2) NULL,
[Quantity] [int] NULL,
[Crew] [int] NULL,
[OriginDestination] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreatedOn] [datetime] NOT NULL,
[CreatedBy] [int] NOT NULL,
[LastEditedOn] [datetime] NULL,
[LastEditedBy] [int] NULL,
[SubmittedOn] [datetime] NULL,
[SubmittedBy] [int] NULL,
[ClearedOn] [datetime] NULL,
[ClearedBy] [int] NULL,
[BranchPriKey] [int] NOT NULL,
[OriginXtraStopFID] [int] NULL,
[DestXtraStopFID] [int] NULL,
[DispatchStatusFID] [int] NULL,
[ContainerizationStatusFID] [int] NULL,
[VoidedBy] [int] NULL,
[VoidedOn] [datetime] NULL,
[CartonCountSource] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CancelledBy] [int] NULL,
[CancelledOn] [datetime] NULL,
[RequestedStartTime] [datetime] NULL,
[RequestedEndTime] [datetime] NULL,
[OperationalPlanFID] [int] NULL,
[OriginOrderLocationFID] [int] NULL,
[DestinationOrderLocationFID] [int] NULL,
[Sort1] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Sort2] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CrewReportTime] [datetime] NULL,
[CrewReportLocationFID] [int] NULL,
[IsPlaceHolder] [bit] NOT NULL CONSTRAINT [DF_LocServ_IsPlaceHolder] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [CK_CartonCountSource] CHECK (([CartonCountSource]='S' OR [CartonCountSource]='O' OR [CartonCountSource]='M'))
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [PK_LOCSERV] PRIMARY KEY CLUSTERED  ([PriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_BranchPriKey_ServiceDate] ON [dbo].[LocServ] ([BranchPriKey], [ServiceDate]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_Branch_ServStatus] ON [dbo].[LocServ] ([BranchPriKey], [ServStatus]) INCLUDE ([SubmittedOn]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_ClearedBy] ON [dbo].[LocServ] ([ClearedBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_CreatedBy] ON [dbo].[LocServ] ([CreatedBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_DestXtraStopFID] ON [dbo].[LocServ] ([DestXtraStopFID]) INCLUDE ([PriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_LastEditedBy] ON [dbo].[LocServ] ([LastEditedBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_OperationalPlanFID] ON [dbo].[LocServ] ([OperationalPlanFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_OrdPriKey] ON [dbo].[LocServ] ([OrdPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_OriginXtraStopFID] ON [dbo].[LocServ] ([OriginXtraStopFID]) INCLUDE ([PriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_ServiceDate] ON [dbo].[LocServ] ([ServiceDate], [PriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LocServ_SubmittedBy] ON [dbo].[LocServ] ([SubmittedBy]) ON [PRIMARY]
GO
CREATE STATISTICS [STAT_LocServ_ServiceData] ON [dbo].[LocServ] ([ServiceDate], [PriKey])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_BRANCH] FOREIGN KEY ([BranchPriKey]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_Sysuser4] FOREIGN KEY ([CancelledBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_Sysuser3] FOREIGN KEY ([ClearedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_ContainerizationStatus] FOREIGN KEY ([ContainerizationStatusFID]) REFERENCES [dbo].[ContainerizationStatus] ([ContainerizationStatusID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_Sysuser] FOREIGN KEY ([CreatedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_CrewReportLocation] FOREIGN KEY ([CrewReportLocationFID]) REFERENCES [dbo].[CrewReportLocation] ([CrewReportLocationID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_OrderLocations2] FOREIGN KEY ([DestinationOrderLocationFID]) REFERENCES [dbo].[OrderLocations] ([OrderLocationID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_XtraStop2] FOREIGN KEY ([DestXtraStopFID]) REFERENCES [dbo].[XtraStop] ([PriKey])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_DispatchStatusFID] FOREIGN KEY ([DispatchStatusFID]) REFERENCES [dbo].[DispatchStatus] ([DispatchStatusID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_Sysuser1] FOREIGN KEY ([LastEditedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_OperationalPlan] FOREIGN KEY ([OperationalPlanFID]) REFERENCES [dbo].[OperationalPlan] ([OperationalPlanID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_ORDERS] FOREIGN KEY ([OrdPriKey]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_OrderLocations1] FOREIGN KEY ([OriginOrderLocationFID]) REFERENCES [dbo].[OrderLocations] ([OrderLocationID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_XtraStop1] FOREIGN KEY ([OriginXtraStopFID]) REFERENCES [dbo].[XtraStop] ([PriKey])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_ServType] FOREIGN KEY ([ServiceID]) REFERENCES [dbo].[ServType] ([ServiceID])
GO
ALTER TABLE [dbo].[LocServ] ADD CONSTRAINT [FK_LOCSERV_Sysuser2] FOREIGN KEY ([SubmittedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[LocServ] TO [MssExec]
GRANT INSERT ON  [dbo].[LocServ] TO [MssExec]
GRANT DELETE ON  [dbo].[LocServ] TO [MssExec]
GRANT UPDATE ON  [dbo].[LocServ] TO [MssExec]
GO
Uses
Used By