Skip to content

Instantly share code, notes, and snippets.

@carinavockell
Created September 12, 2022 16:25
Show Gist options
  • Save carinavockell/ca780b5e28e4b89c97fa91e8cbeadc79 to your computer and use it in GitHub Desktop.
Save carinavockell/ca780b5e28e4b89c97fa91e8cbeadc79 to your computer and use it in GitHub Desktop.
The example below passes each value from Production.Product into the MSFTF and returns all product values having associated records returned from the function call.
SELECT
p.ProductID,
p.Name,
x.TotalSales
FROM Production.Product p
CROSS 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