All,
I have the following table.
SalesDate SubChannel Country NetQuantity
20140826 TV Attributable CA 194
20140826 Unknown CA 60
20140826 Web Property CA 64
20140826 Overall CA 264
20140826 Search CA 70
I want to display this information as a pivot table.
Before I was using the following piece of code to make this happen, but the current system I have to migrate to, doesn't support pivot functions.
Select SalesDate,
Country,
[Search],
[Unknown],
[Web Property],
[TV Attributable],
[Overall]
From temp
PIVOT
(
Sum([NetQuantity])
FOR [SubChannel] IN ([Search],[Unknown],[Web Property],[TV Attributable],[Overall])
) as p
Can somebody help me accomplish the following output:
SalesDate Country Search Unknown WebProperty TVAttributable Overall
20140826 CA 70 60 64 194 264