Created
June 30, 2016 17:32
-
-
Save Fhernd/da700742e0fc6c2e0c9927d26fe4db86 to your computer and use it in GitHub Desktop.
Reporte de apellidos de empleados y vendedores. [OrtizOL]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT P1.LastName AS 'Apellido' | |
FROM HumanResources.Employee AS E | |
INNER JOIN Person.Person AS P1 | |
ON e.BusinessEntityID = P1.BusinessEntityID | |
UNION | |
SELECT P2.LastName AS 'Apellido' | |
FROM Sales.SalesPerson AS SP | |
INNER JOIN Person.Person AS P2 | |
ON SP.BusinessEntityID = P2.BusinessEntityID; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment