select 开始日期,结束日期, sum(case when 单号=@基准 then 预测量 else 0 end) as '预测量(基准)', sum(case when 单号=@其他 then 预测量 else 0 end) as '预测量' from 表名 group by 开始日期,结束日期
先把两表数据提取出来,存在泛型集合内,再创建一张表,遍历泛型集合内的数据。
110,533
社区成员
642,574
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧