select b.tradecode,b.fullname,b.fullname,b.qty,b.price,sum(b.tsum) from tb_sell_main a inner join (select billcode,tradecode,fullname,sum(qty),sum(tsum)from tb_sell_detalied )b a.billcode=b.billcode where(biidate between '"+dptStart .Value +"'and '"+dtpEnd +"')
select b.tradecode,b.fullname,b.fullname,b.qty,b.price,sum(b.tsum) from tb_sell_main a inner join (select billcode,tradecode,fullname,sum(qty),sum(tsum)from tb_sell_detalied ) b On a.billcode=b.billcode where(biidate between '"+dptStart .Value +"'and '"+dtpEnd +"')
消息 102,级别 15,状态 1,第 1 行
',' 附近有语法错误。