string Sql1 = "select dwmc as 单位名称,count(case when t.zl in 'A' then 'A' end) A类卡,count(case when t.zl in 'B' then 'B' end) B类卡,count(case when t.zl in 'C' then 'C' end) C类卡,count(case when t.zl in 'D' then 'D' end) D类卡,count(case when t.zl in 'E' then 'E' end) E类卡,count(case when t.zl in 'F' then 'F' end) F类卡,count(case when t.zl in 'T' then 'T' end) T类卡 from T_TRUCK t where 1=1";
string Sql2 = "group by dwmc order by dwmc";
Sql1 +="and t.gsbz = '" + KZT_First + "'";
string Sql = Sql1+Sql2;
string Sql2 = "group by dwmc order by dwmc";
Sql1 +="and t.gsbz = '" + KZT_First + "'";
string Sql = Sql1+Sql2;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货