Комментарии:
tq so much
Ответитьit very helpfull
ОтветитьThank you sir
ОтветитьThanks a lot, it solved my issue.
ОтветитьThank you so much, this was so helpful! :)
ОтветитьNice
ОтветитьSilent Movie?!!!!
Ответитьusing union query and one column
select [Year] ,CameraQt,CameraValue,ComputerQt,ComputerValue from
(
Select [year],product +'Qt' as Product,Qt as Value from PivotTable
union
Select [year],product +'Value' as Product,AMT as Value from PivotTable) as Sub3
Pivot
(
Sum(Value)
for Product
in (CameraQt,CameraValue,ComputerQt,ComputerValue)
) as PV
Thanks for bringing an insight on one of the less known feature, pivoting in SQL server
Ответить