Welcome
Guest
, you are in:
<root>
•
Login
devio dbscript ScrewTurn Wiki
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
Administration
File Management
Create Account
Search the wiki
»
Back
HumanResources vEmployeeDepartment (view)
Modified on 2011/08/27 11:17
by
wikibot
Categorized as
Uncategorized
== wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- valign="top" | '''View''' | HumanResources.vEmployeeDepartment |- valign="top" | '''Description''' | Returns employee name, title, and current department. |} === Source === {{{{<nowiki> CREATE VIEW [HumanResources].[vEmployeeDepartment] AS SELECT e.[EmployeeID] ,c.[Title] ,c.[FirstName] ,c.[MiddleName] ,c.[LastName] ,c.[Suffix] ,e.[Title] AS [JobTitle] ,d.[Name] AS [Department] ,d.[GroupName] ,edh.[StartDate] FROM [HumanResources].[Employee] e INNER JOIN [Person].[Contact] c ON c.[ContactID] = e.[ContactID] INNER JOIN [HumanResources].[EmployeeDepartmentHistory] edh ON e.[EmployeeID] = edh.[EmployeeID] INNER JOIN [HumanResources].[Department] d ON edh.[DepartmentID] = d.[DepartmentID] WHERE GETDATE() BETWEEN edh.[StartDate] AND ISNULL(edh.[EndDate], GETDATE()); </nowiki>}}}} === References === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Dependency Type''' | '''Object Type''' | '''Referenced Object''' |- valign="top" | Select | Table | [[HumanResources Department (table)|HumanResources.Department]] |- valign="top" | Select | Table | [[HumanResources Employee (table)|HumanResources.Employee]] |- valign="top" | Select | Table | [[HumanResources EmployeeDepartmentHistory (table)|HumanResources.EmployeeDepartmentHistory]] |- valign="top" | Select | Table | [[Person Contact (table)|Person.Contact]] |- valign="top" | Schema | Schema | [[HumanResources (schema)|HumanResources]] |}
ScrewTurn Wiki
version 3.0.1.400. Some of the icons created by
FamFamFam
.