i dont use sql pivot
sql query return
date total name
01/01/2014 20 mark
10/01/2014 30 daniel
11/01/2014 40 mark
i want to datatable
date mark daniel
01/01/2014 20
10/01/2014 30
11/01/2014 40

VulpesRank #55 · 29.2K reputationPosted Mar 4, 2014, 11:37 AM EST
Then the following code should create another DataTable on the lines you want:
Whal55 reputationPosted Mar 4, 2014, 10:31 PM EST
date mark daniel
01/01/2014 20 30
VulpesRank #55 · 29.2K reputationPosted Mar 4, 2014, 11:54 PM EST
Try this revised code which also deals with the case where there's more than one row with both the same date and the same name: