首页上一页 1 下一页尾页 1 条记录 1/1页
这个看不懂
发表在C#图书答疑
2016-08-15
是否精华
是
否
版块置顶:
是
否
c#自学视频教程21章的问题
return (data.RunProcReturn("SELECT b.tradecode AS 商品编号, b.fullname AS 商品名称, SUM(b.qty) AS 进货数量,SUM(b.tsum) AS 进货金额 FROM tb_warehouse_main AS a INNER JOIN (SELECT billcode, tradecode, fullname, SUM(qty) AS qty, SUM(tsum) AS tsum FROM tb_warehouse_detailed GROUP BY tradecode, billcode, fullname) AS b ON a.billcode = b.billcode AND a.units LIKE @units AND a.handle LIKE @handle WHERE (a.billdate BETWEEN '" + starDateTime + "' AND '" + endDateTime + "') GROUP BY b.tradecode, b.fullname",prams, tbName));
详细讲解一下;多表连接查询。还有后面的a.units LIKE @units AND a.handle LIKE @handle,这个LINK用法
return (data.RunProcReturn("SELECT b.tradecode AS 商品编号, b.fullname AS 商品名称, SUM(b.qty) AS 进货数量,SUM(b.tsum) AS 进货金额 FROM tb_warehouse_main AS a INNER JOIN (SELECT billcode, tradecode, fullname, SUM(qty) AS qty, SUM(tsum) AS tsum FROM tb_warehouse_detailed GROUP BY tradecode, billcode, fullname) AS b ON a.billcode = b.billcode AND a.units LIKE @units AND a.handle LIKE @handle WHERE (a.billdate BETWEEN '" + starDateTime + "' AND '" + endDateTime + "') GROUP BY b.tradecode, b.fullname",prams, tbName));
详细讲解一下;多表连接查询。还有后面的a.units LIKE @units AND a.handle LIKE @handle,这个LINK用法