O'Reilly logo
  • Dustin Waybright thinks this is interesting:

Then you specify the IN clause followed by the list of distinct values that appear in the spreading element, separated by commas. What used to be values in the spreading column (in this, case shipper IDs) become column names in the result table. Therefore, the items in the list should be expressed as column identifiers. Remember that if a column identifier is irregular, it has to be delimited. Because shipper IDs are integers, they have to be delimited: [1],[2],[3].


Cover of Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012


Instead of automatically spreading the values in the spreading element, they must be listed in after the PIVOT operator and IN clause.