plz hepl me ......
table_1
Name_____Date_________Ptype
Keadr____22/2/2010____P
Anup_____22/2/2010____P
Deepak___22/2/2010____A
Keadr____23/2/2010____P
Anup_____23/2/2010____L
Deepak___23/2/2010____A
Keadr____24/2/2010____P
Anup_____24/2/2010____P
Deepak___24/2/2010____P
I want To convert this table as
Name_____22/2/2010____23/2/2010_____24/2/2010
Kedar____P____________P_____________P
Anup_____P____________L_____________P
Deepak___A____________A_____________P
my query
select * from table_1 PIVOT(MAX(Ptype)FOR[Date]IN([22/2/2010],[23/2/2010],[24/2/2010]))AS p
i got result
Name_____22/2/2010______23/2/2010______24/2/2010
Kedar
Anup
Deepak
didnt get values in 22/2 ,23/2,24/3 col