Good intro. Thanks.
I've got a question, though. Given this statement from your article:
INSERT INTO SalesByPerson
SELECT SalesPersonID, ,, FROM Sales.SalesSummarry
PIVOT(SUM(SubTotal) FOR OrderYear IN
(,,)) as SalesPivot
is the IN (.....) required? What if I don't know the values and/or the values change? Am I stuck with dynamic SQL? Could I maybe put a sub-query (i.e. select DISTINCT OrderYear) in there?