在 SQL 中:
select SE.shipperId, SUM(SEDetail.totalSize) as CBM from SE, SEDetail
where SEDetail.shipperId=10011 and SE.id = SEDetail.bolId and SEDetail.containerId
between 1 and 5 group by SE.shipperID
我改变了这一点,并在 aspx.vb 中工作:
SELECT SE.shipperID as 'Shipper ID', SUM(SEDetail.totalSize) as CBM
FROM SE inner join SEDetail on SE.id = SEDetail.bolId and SEDetail.containerId
between 1 and 5 Where
但是当我group by
在sql中添加时出现错误:
SELECT SE.shipperID as 'Shipper ID', SUM(SEDetail.totalSize) as CBM
FROM SE inner join SEDetail on SE.id = SEDetail.bolId and SEDetail.containerId
between 1 and 5 Where group by SE.shipperID
如何在一个 sql 中使用它?