Created
July 10, 2020 15:08
-
-
Save karenpayneoregon/bc8329737eee80dfd2f9df0f9d3dbc63 to your computer and use it in GitHub Desktop.
Get order by order id
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
DECLARE @OrderIdentifier INT= 10248; | |
SELECT O.OrderID, | |
O.CustomerIdentifier, | |
O.EmployeeID, | |
E.Title + ' ' + E.FirstName + ' ' + E.LastName AS Employee, | |
O.OrderDate, | |
O.RequiredDate, | |
O.ShippedDate, | |
O.ShipVia, | |
O.Freight, | |
O.ShipAddress, | |
O.ShipCity, | |
O.ShipRegion, | |
O.ShipPostalCode, | |
O.ShipCountry | |
FROM Orders AS O | |
INNER JOIN Employees AS E ON O.EmployeeID = E.EmployeeID | |
WHERE O.OrderID = @OrderIdentifier; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment