设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 761|回复: 3
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
发表于 2005-5-12 20:39:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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;
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
 楼主| 发表于 2005-5-16 16:31:00 | 只看该作者
没人知道摸,是不是俺用的ACCESS的版本不对啊
3#
 楼主| 发表于 2005-5-19 17:57:00 | 只看该作者
俺顶
4#
发表于 2005-5-19 18:46:00 | 只看该作者
我这里可以保存,我用的是access2003
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-11-3 03:39 , Processed in 0.171045 second(s), 28 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表