Difference between revisions of "HumanResources.vEmployee (view)"
| Line 47: | Line 47: | ||
| '''view | | '''view | ||
| HumanResources.vEmployee | | HumanResources.vEmployee | ||
| − | |- | + | |- valign="top" |
| '''Description | | '''Description | ||
| Line 96: | Line 96: | ||
| '''Object Type | | '''Object Type | ||
| '''Dependency Type | | '''Dependency Type | ||
| − | + | ||
|- | |- | ||
| [[HumanResources.Employee_(table)|HumanResources.Employee]] | | [[HumanResources.Employee_(table)|HumanResources.Employee]] | ||
| Line 121: | Line 121: | ||
| Table | | Table | ||
| Select | | Select | ||
| + | |- | ||
| + | | [[.HumanResources_(schema)|.HumanResources]] | ||
| + | | Schema | ||
| + | | Schema | ||
|} | |} | ||
Revision as of 06:26, 30 November 2009
wikibot
| view | HumanResources.vEmployee |
CREATE VIEW [HumanResources].[vEmployee]
AS
SELECT
e.[EmployeeID]
,c.[Title]
,c.[FirstName]
,c.[MiddleName]
,c.[LastName]
,c.[Suffix]
,e.[Title] AS [JobTitle]
,c.[Phone]
,c.[EmailAddress]
,c.[EmailPromotion]
,a.[AddressLine1]
,a.[AddressLine2]
,a.[City]
,sp.[Name] AS [StateProvinceName]
,a.[PostalCode]
,cr.[Name] AS [CountryRegionName]
,c.[AdditionalContactInfo]
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = e.[ContactID]
INNER JOIN [HumanResources].[EmployeeAddress] ea
ON e.[EmployeeID] = ea.[EmployeeID]
INNER JOIN [Person].[Address] a
ON ea.[AddressID] = a.[AddressID]
INNER JOIN [Person].[StateProvince] sp
ON sp.[StateProvinceID] = a.[StateProvinceID]
INNER JOIN [Person].[CountryRegion] cr
ON cr.[CountryRegionCode] = sp.[CountryRegionCode];
automatically generated
| view | HumanResources.vEmployee |
| Description | Employee names and addresses. |
CREATE VIEW [HumanResources].[vEmployee]
AS
SELECT
e.[EmployeeID]
,c.[Title]
,c.[FirstName]
,c.[MiddleName]
,c.[LastName]
,c.[Suffix]
,e.[Title] AS [JobTitle]
,c.[Phone]
,c.[EmailAddress]
,c.[EmailPromotion]
,a.[AddressLine1]
,a.[AddressLine2]
,a.[City]
,sp.[Name] AS [StateProvinceName]
,a.[PostalCode]
,cr.[Name] AS [CountryRegionName]
,c.[AdditionalContactInfo]
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = e.[ContactID]
INNER JOIN [HumanResources].[EmployeeAddress] ea
ON e.[EmployeeID] = ea.[EmployeeID]
INNER JOIN [Person].[Address] a
ON ea.[AddressID] = a.[AddressID]
INNER JOIN [Person].[StateProvince] sp
ON sp.[StateProvinceID] = a.[StateProvinceID]
INNER JOIN [Person].[CountryRegion] cr
ON cr.[CountryRegionCode] = sp.[CountryRegionCode];
| Referenced Object | Object Type | Dependency Type |
| HumanResources.Employee | Table | Select |
| HumanResources.EmployeeAddress | Table | Select |
| Person.Address | Table | Select |
| Person.Contact | Table | Select |
| Person.CountryRegion | Table | Select |
| Person.StateProvince | Table | Select |
| .HumanResources | Schema | Schema |