View: [AdventureWorks2016CTP3].[HumanResources].[vEmployeePersonTemporalInfo]

CollapseAll image

Collapse image View properties


Name  Value 
 Schema   [HumanResources] 
 Owner   [dbo] 
 Creation date   23.10.2015 
 Is schema bound   
 Encrypted   
 ID   1918629878 

Collapse image Creation options


Name Value
QUOTED_IDENTIFIER ON
ANSI_NULLS ON

Collapse image Resultset


Name  Description Data type Max length
BusinessEntityID   int 4
Title   nvarchar 8
FirstName   [dbo].[Name] 50
LastName   [dbo].[Name] 50
MiddleName   [dbo].[Name] 50
JobTitle   nvarchar 50
MaritalStatus   nchar 1
Gender   nchar 1
VacationHours   smallint 2
SickLeaveHours   smallint 2
Total: 10 column(s)

Collapse image Objects that depend on [HumanResources].[vEmployeePersonTemporalInfo]


Object name Object type Dep level
[HumanResources].[sp_GetEmployee_Person_Info_AsOf] Procedure 1
Total 1 object(s)

Collapse image Objects that [HumanResources].[vEmployeePersonTemporalInfo] depends on


Object name Object type Dep level
[HumanResources] Schema 1
[HumanResources].[Employee_Temporal] Table 1
[Person].[Person_Temporal] Table 1
Total 3 object(s)

Collapse image SQL


SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO

/*
    View that joins [Person].[Person_Temporal] [HumanResources].[Employee_Temporal]
    This view can be later used in temporal querying which is extremely flexible and convenient
    given that participating tables are temporal and can be changed independently
*/
CREATE VIEW [HumanResources].[vEmployeePersonTemporalInfo]
AS
SELECT P.BusinessEntityID, P.Title, P. FirstName, P.LastName, P.MiddleName
, E.JobTitle, E.MaritalStatus, E.Gender, E.VacationHours, E.SickLeaveHours
FROM [Person].Person_Temporal P
JOIN  [HumanResources].[Employee_Temporal] E
ON P.[BusinessEntityID] = E.[BusinessEntityID]

GO

Collapse image See also


List of views