← All tables and views
AdventureWorks OLTP view
HumanResources.vEmployeeDepartment
Native view in the AdventureWorks OLTP sample database.
290rows
10 columns
Schema from the provider contract| Column | Type | Nullable | Key | References |
|---|---|---|---|---|
BusinessEntityID | | yes | — | — |
Title | | yes | — | — |
FirstName | | yes | — | — |
MiddleName | | yes | — | — |
LastName | | yes | — | — |
Suffix | | yes | — | — |
JobTitle | | yes | — | — |
Department | | yes | — | — |
GroupName | | yes | — | — |
StartDate | | yes | — | — |
View definition
CREATE VIEW "HumanResources.vEmployeeDepartment" AS
SELECT
e."BusinessEntityID"
,p."Title"
,p."FirstName"
,p."MiddleName"
,p."LastName"
,p."Suffix"
,e."JobTitle"
,d."Name" AS "Department"
,d."GroupName"
,edh."StartDate"
FROM "HumanResources.Employee" e
INNER JOIN "Person.Person" p
ON p."BusinessEntityID" = e."BusinessEntityID"
INNER JOIN "HumanResources.EmployeeDepartmentHistory" edh
ON e."BusinessEntityID" = edh."BusinessEntityID"
INNER JOIN "HumanResources.Department" d
ON edh."DepartmentID" = d."DepartmentID"
WHERE edh.EndDate IS NULLData preview
Sample records
| BusinessEntityID | Title | FirstName | MiddleName | LastName | Suffix | JobTitle |
|---|---|---|---|---|---|---|
| 1 | NULL | Ken | J | Sánchez | NULL | Chief Executive Officer |
| 2 | NULL | Terri | Lee | Duffy | NULL | Vice President of Engineering |
| 3 | NULL | Roberto | NULL | Tamburello | NULL | Engineering Manager |
| 4 | NULL | Rob | NULL | Walters | NULL | Senior Tool Designer |
| 5 | Ms. | Gail | A | Erickson | NULL | Design Engineer |
| 6 | Mr. | Jossef | H | Goldberg | NULL | Design Engineer |
| 7 | NULL | Dylan | A | Miller | NULL | Research and Development Manager |
| 8 | NULL | Diane | L | Margheim | NULL | Research and Development Engineer |