C# Sql语句
原语句:string Sql = "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 group by dwmc order by dwmc";
想添加几个条件到where 1=1 处,比如:Sql += "and t.gsbz = '" + KZT_First + "'";
如何实现,这里Sql += "and t.gsbz = '" + KZT_First + "'";是错的。