c# - aggregation result from SQL view to gridview -


i have view multi tables

account_name.......bonus..........value

customer1............a............14000

customer1............b............500

customer1............c............14500

customer2............a............20000

customer2............b............200

customer2............c............20200

http://im33.gulfup.com/nt0mm.png

how can retrieval view , show on gridview view using linq

...................a.........b..........c

customer1.......14000.......500.......14500

customer2.......20000.......200.......20200

enter image description here

select account_name,  sum(case when bonus = 'a' value else 0 end) a, sum(case when bonus = 'b' value else 0 end) b, sum(case when bonus = 'c' value else 0 end) c youview group account_name 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -