Advertisement
Fhernd

ApellidosEmpleadosVendedores.sql

Jun 30th, 2016
1,132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.34 KB | None | 0 0
  1. SELECT P1.LastName AS 'Apellido'
  2.     FROM HumanResources.Employee AS E
  3.         INNER JOIN Person.Person AS P1
  4.             ON e.BusinessEntityID = P1.BusinessEntityID
  5. UNION
  6. SELECT P2.LastName AS 'Apellido'
  7.     FROM Sales.SalesPerson AS SP
  8.         INNER JOIN Person.Person AS P2
  9.             ON SP.BusinessEntityID = P2.BusinessEntityID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement