- SQL code
select c.cod_mitem,b.rot_ord,b.Plan_wkhr_m,(sum(a.plan_wkhr_n) + sum(a.plan_wkhr_o))from web_wlms_o4sequence_user a
left join web_wlms_o3sequence b on a.rot_ord_id = b.id
left join web_wlms_o2order c on b.num_ord_id = c.id
group by c.cod_mitem,b.rot_ord,b.Plan_wkhr_m order by rot_ord
其他绑定都没问题,就是,(sum(a.plan_wkhr_n) + sum(a.plan_wkhr_o))这个在 gridview绑定DataField的时候应该怎么写啊
------解决方案--------------------------------------------------------
,(sum(a.plan_wkhr_n) + sum(a.plan_wkhr_o)) as sum_plan_wkhr 起个别名
然后绑定 sum_plan_wkhr