Views [dbo].[LocalServicesCrew]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnNo
Schema BoundYes
Created6:18:17 PM Tuesday, February 27, 2007
Last Modified9:18:30 AM Friday, November 8, 2024
Columns
Name
LocalServicesCrewLSCrewFID
LocalServicesCrewLocServFID
CrewFirstName
CrewLastName
LeadMan
ScheduledStartTime
ScheduledEndTime
ActualStartTime
ActualEndTime
ActualIsOverTime
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
SET QUOTED_IDENTIFIER OFF
GO
/**
*    
*Description:
*
*Error Codes: (none)
*/


CREATE view [dbo].[LocalServicesCrew]
  (
    LocalServicesCrewLSCrewFID,
    LocalServicesCrewLocServFID,
    
    --General Crew Information
    CrewFirstName,
    CrewLastName,
    LeadMan,
    ScheduledStartTime,
    ScheduledEndTime,
    ActualStartTime,
    ActualEndTime,
    ActualIsOverTime
  )
  with SCHEMABINDING

as

select distinct
  LocalServiceCrewLSCrewFID    = LSCrew.PriKey,
  LocalServiceLocServFID    = LSCrew.LSPriKey,
  
  --General Crew Information
  CrewFirstName            = SysUser.FirstName,
  CrewLastName            = SysUser.LastName,
  LeadMan                = LSCrew.LeadMan,
  ScheduledStartTime    = LSCrew.StartTime,
  ScheduledEndTime        = LSCrew.EndTime,  
  ActualStartTime        = LSCrewTimes.StartTime,
  ActualEndTime            = LSCrewTimes.EndTime,
  ActualIsOverTime        = LSCrewTimes.OverTime
  
from dbo.LSCrew
  left outer join dbo.SysUser on ( SysUser.SysUserID = LSCrew.CrewID )
  left outer join dbo.LSCrewTimes on ( LSCrewTimes.LSCPriKey = LSCrew.PriKey )
GO
GRANT SELECT ON  [dbo].[LocalServicesCrew] TO [MssExec]
GRANT INSERT ON  [dbo].[LocalServicesCrew] TO [MssExec]
GRANT DELETE ON  [dbo].[LocalServicesCrew] TO [MssExec]
GRANT UPDATE ON  [dbo].[LocalServicesCrew] TO [MssExec]
GO
Uses