Skip to content

Instantly share code, notes, and snippets.

@karenpayneoregon
Created July 11, 2020 12:09
Show Gist options
  • Save karenpayneoregon/d7a287a9ebb18b4d9e1363f92812d447 to your computer and use it in GitHub Desktop.
Save karenpayneoregon/d7a287a9ebb18b4d9e1363f92812d447 to your computer and use it in GitHub Desktop.
Get employees for NorthWind2020
SELECT E.EmployeeID,
E.TitleOfCourtesy,
E.LastName,
E.FirstName,
CT.ContactTitle,
CONVERT(VARCHAR, E.BirthDate, 1) AS BirthDate,
CONVERT(VARCHAR, E.HireDate, 1) AS HireDate,
E.Address AS Street,
E.City,
E.Region,
E.PostalCode,
E.CountryIdentifier,
C.Name AS CountryName,
E.HomePhone,
E.Extension,
E.Notes,
E.ReportsTo
FROM Employees AS E
INNER JOIN Countries AS C ON E.CountryIdentifier = C.CountryIdentifier
INNER JOIN ContactType AS CT ON E.ContactTypeIdentifier = CT.ContactTypeIdentifier;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment