I've a data set which returns me this set of results:
Date |Location |Amount
11.03.2011|Location1| 1000
11.03.2011|Location2| 1000
11.03.2011|Location3| 1000
12.03.2011|Location1| 1000
12.03.2011|Location2| 1000
12.03.2011|Location3| 1000
13.03.2011|Location4| 1000
I need to arrange my data in this way:
Location | 11.03.2011|12.03.2011|13.03.2011|
Location1| 1000| 1000| 0|
Location2| 1000| 1000| 0|
Location3| 1000| 1000| 0|
Location4| 0| 0| 1000|
Notice that: I don't know the dates in the rows so it's impossible for me to work with "if" clause (e.g.: if date == DateTime.Parse(11.03.2011)
).
I hope that my explanation is clear.