|
kishor86.samant
Starting Member
India
1 Posts |
Posted - 11/08/2012 : 07:48:37
|
Hi,
I have a table like,
Officer_Id Data_Point Data_Point_Value 1 A bhj 1 B dgsdf 1 C bdfbh
I want to get result like,
Officer_Id A B C 1 bhj dgsdf bdfbh
How to achieve it? I tried to use Pivot operator in following way,
select * from pivot_test t pivot( max(Data_Point_Value) for t.Data_Point in ([A],[B],[C]) ) pv
It works. But while querying i am not aware of all data points (i.e. A, B, C). How to say pivot( max(Data_Point_Value) for t.Data_Point in (*) )
Please help.
Thanks in advance, Kishor Samant |
Edited by - kishor86.samant on 11/08/2012 08:08:38
|
|