Procedure:
[AdventureWorks2016CTP3].[HumanResources].[sp_GetEmployee_Person_Info_AsOf]
Name | Value |
Schema | [HumanResources] |
Owner | [dbo] |
Creation date | 23.10.2015 |
Type | P |
Encrypted | |
ID | 1982630106 |
Implementation type | Transact SQL |
Is native compiled |
Name | Value |
QUOTED_IDENTIFIER | ON |
ANSI_NULLS | ON |
Name | Description | Datatype | Max length | Type | ReadOnly |
@asOf | datetime2 | 8 | Input |
Name | Datatype | Max length |
BusinessEntityID | int | 4 |
Title | nvarchar | 8 |
FirstName | nvarchar | 50 |
LastName | nvarchar | 50 |
MiddleName | nvarchar | 50 |
JobTitle | nvarchar | 50 |
MaritalStatus | nchar | 1 |
Gender | nchar | 1 |
VacationHours | smallint | 2 |
SickLeaveHours | smallint | 2 |
Name | Datatype | Max length |
BusinessEntityID | int | 4 |
Title | nvarchar | 8 |
FirstName | nvarchar | 50 |
LastName | nvarchar | 50 |
MiddleName | nvarchar | 50 |
JobTitle | nvarchar | 50 |
MaritalStatus | nchar | 1 |
Gender | nchar | 1 |
VacationHours | smallint | 2 |
SickLeaveHours | smallint | 2 |
Object name | Object type | Dep level |
[HumanResources] | Schema | 1 |
[HumanResources].[vEmployeePersonTemporalInfo] | View | 1 |
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON GO /* Stored procedure used for querying Employee and Person data AS OF If @AsOf parameter is NULL, current data is queried otherwise both current and historical data is queried */ CREATE PROCEDURE [HumanResources].[sp_GetEmployee_Person_Info_AsOf] @asOf datetime2 = NULL AS IF @asOf IS NULL SELECT * FROM [HumanResources].[vEmployeePersonTemporalInfo] ELSE SELECT * FROM [HumanResources].[vEmployeePersonTemporalInfo] FOR SYSTEM_TIME AS OF @asOf; GO |