W
wjqzzzz
Unregistered / Unconfirmed
GUEST, unregistred user!
在ORACLE环境下可以执行成功,但加入到DELPHI中后,总是编译出错,怎样才能正常执行呀!
语句如下:
select PPDGY0302 商品编码,dg0102 商品名称,sum(PPDGY0304) 帐存数量,sum(PPDGY0305) 帐存金额 ,sum(PPDGY0306) 实盘数量,sum(PPDGY0307) 实盘金额,sum(PPDGY0306-PPDGY0304) 盈亏数量,
sum(PPDGY0307-PPDGY0305) 盈亏金额
from PPDGY003,dg001
where ppdgy0301 between 161 and 221
and dg0101=ppdgy0302
and ppdgy0302 like '24%'
having sum(PPDGY0307-PPDGY0305)<>0
group by PPDGY0302,dg0102
order by sum(PPDGY0307-PPDGY0305)
语句如下:
select PPDGY0302 商品编码,dg0102 商品名称,sum(PPDGY0304) 帐存数量,sum(PPDGY0305) 帐存金额 ,sum(PPDGY0306) 实盘数量,sum(PPDGY0307) 实盘金额,sum(PPDGY0306-PPDGY0304) 盈亏数量,
sum(PPDGY0307-PPDGY0305) 盈亏金额
from PPDGY003,dg001
where ppdgy0301 between 161 and 221
and dg0101=ppdgy0302
and ppdgy0302 like '24%'
having sum(PPDGY0307-PPDGY0305)<>0
group by PPDGY0302,dg0102
order by sum(PPDGY0307-PPDGY0305)