Office中国论坛/Access中国论坛

标题: [原创]新写了个查询,运行可以,但是一保存就说ACCESS遇到问题即将关闭,发送不发关,何 [打印本页]

作者: biglee    时间: 2005-5-12 20:39
标题: [原创]新写了个查询,运行可以,但是一保存就说ACCESS遇到问题即将关闭,发送不发关,何
select  e.name ,inv.rawno,inv.ppp as 投入价值,outv.sss AS 产出价值, (outv.sss-inv.ppp) as 利润,利润/产出价值*100  AS  [利润率%]
from em_data as e,

[SELECT e.name,i.rawno,sum(i.quanity_in*p.pu_price) as ppp
from em_data as e,input as i , pu_price as p
where e.no=i.no and i.rawno=p.rawno and i.code=p.code and i.note_pu=p.note_pu and p.finish=yes
GROUP BY e.name, i.rawno
ORDER BY  i.rawno DESC]. as inv,

[SELECT  e.name,p.rawno,sum(o.quanity_OUT*sa.sa_PRICE) as sss
from em_data as e,output as o , sa_price as sa , pu_price as p
where e.no=o.no and o.rawno =p.rawno and p.finish=yes and o.code=sa.code
group by e.name,p.rawno
ORDER BY  p.rawno DESC]. as outv

where e.name=inv.name and inv.name=outv.name and inv.rawno=outv.rawno

ORDER BY  inv.rawno

=================================================+++++++++++++++++++++++++++++++++++
SELECT e.name,i.rawno,sum(i.quanity_in*p.pu_price) as ppp
from em_data as e,input as i , pu_price as p
where e.no=i.no and i.rawno=p.rawno and i.code=p.code and i.note_pu=p.note_pu and p.finish=yes
GROUP BY e.name, i.rawno
ORDER BY  i.rawno DESC;

作者: biglee    时间: 2005-5-16 16:31
没人知道摸,是不是俺用的ACCESS的版本不对啊
作者: biglee    时间: 2005-5-19 17:57
俺顶
作者: 海狸先生    时间: 2005-5-19 18:46
我这里可以保存,我用的是access2003




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3