-
-
Save carinavockell/dba94cd2a820b800c8375b4f7fc48119 to your computer and use it in GitHub Desktop.
In the output below, ProductID values 1, 3, 2, and 316 don’t have associated sales, so the TotalSales column from the Sales.GetSalesByProduction function returns a NULL.
This file contains hidden or 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 p.ProductID, p.Name, x.TotalSales | |
FROM Production.Product p | |
OUTER APPLY Sales.GetSalesByProduct (p.ProductID) AS x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment