John Hammond

John Hammond

  • NA
  • 16
  • 8.7k

Conveting rows to columns

May 1 2014 2:25 PM
If I have a table that looks like the one below.How do I convet the rows into columns in C#.
 
Date       Datatype   outlet   AMT
1/12/12   SUM           A          80                   
1/12/12   SUM           B          70
1/12/12   SUM           C          60
1/12/12   COUNT      A          15
1/12/12   COUNT      B          15
1/12/12    COUNT     C          10 
 
This is how I want it to look ANY HELP.  Thanks
 
Date          Datatype   A      B          C
1/12/12         S            80    70       60
1/12/12         C           15    15        12

Answers (2)