设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

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

靠~~Access的查询这么复杂

[复制链接]
跳转到指定楼层
1#
发表于 2004-7-1 20:07:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
靠~~Access的查询这么复杂?

晕晕晕晕晕晕~~~`



SELECT tblselect.*,

tblselectsub.*,

tblmodel.Model,

tblmodel.q0,

tblmodel.Qv100,

tblmodel.dPmax,

tblmodel.nmax,

tblCLImodelc.Frame,

tblCLImodelc.Limit,

tblCLImodelc.Max,

tblselect.P1 AS AP,

Forms!zfsel!fqv100 AS FQV100,

[Qv100]*[FQV100]*Sqr(1.293*(Psi2Mbar([DP]+[VP]))/([RHO1]*100)) AS Qv,

Ft32Mt3([Q1])+[Qv] AS Q0H, 1000*[Q0H]/[q0] AS n,

[RPMmax]*[nmax] AS Lnmax,

Forms!zfsel!RPMmin*[nmax] AS nmin,

[n]/[nmax] AS nnmax, [nmax]-[n] AS [nmax-n],

Ft32Mt3([Q1])/[Q0H] AS nv, (Psi2Mbar([DP]+[VP]))/([cp]*[Rho1]*[nv]*10) AS dt,

Rank2Kel([T1]) AS Tk, Rank2C([T1])+[dt] AS t2c,

[Q0H]*(Psi2Mbar([DP]+[VP]))/600 AS Pthkw,

[n5]*[n]^5 AS sn5, [n4]*[n]^4 AS sn4,

[n3]*[n]^3 AS sn3, [n2]*[n]^2 AS sn2,

[n1]*[n] AS sn1,

tblCLImodelc.n0, [sn5]+[sn4]+[sn3]+[sn2]+[sn1]+[n0] AS pv,

[pthkw]+[pv] AS Pkw,

Ft32Mt3([Q1])*(Psi2Mbar([DP]+[VP]))/600 AS Pq1,

[Pq1]/[pkw] AS Meff,

(1/([n]/[nmax]))*((1/((Psi2Mbar([DP]+[VP]))/[dpmax]))^3)*40000 AS L10,

tblCLIsound.Hood,

[n]*[x] AS a, Psi2Mbar([DP])*[y] AS b,

[xy]*[n]*Psi2Mbar([DP]) AS c, [x2]*[n]^2 AS d,

[y2]*Psi2Mbar([DP])^2 AS e, [y3]*Psi2Mbar([DP])^3 AS f,

[x2y]*[n]^2*Psi2Mbar([DP]) AS g,

[x2y2]*[n]^2*Psi2Mbar([DP])^2 AS h,

[xy2]*[n]*Psi2Mbar([DP])^2 AS i,

[xy3]*[n]*Psi2Mbar([DP])^3 AS j,

tblCLIsound.Add,

[a]++[c]+[d]+[e]+[f]+[g]+[h]++[j]+[add] AS Zdb1

FROM (((tblselect LEFT JOIN tblmodel ON tblselect.ModelID = tblmodel.ModelID)

LEFT JOIN tblCLIsound ON tblmodel.ModelID = tblCLIsound.ModelID)

LEFT JOIN tblCLImodelc ON tblmodel.ModelID = tblCLImodelc.ModelID)

LEFT JOIN tblselectsub ON tblselect.SelID = tblselectsub.SelID

WHERE (((tblCLImodelc.Max)>=(SELECT Max( Ft32Mt3 ([Q1])) AS [Max]

FROM tblselectsub GROUP BY tblselectsub.SelID

HAVING (((tblselectsub.SelID)=[Forms]![zfsel]![zfsela].[Form]![SelID]))))

AND ((tblselect.ModelID)=[Forms]![zfsel]![ModID])

AND ((tblselectsub.SelID)=[Forms]![zfsel]![SelID]))

ORDER BY tblmodel.q0, tblCLImodelc.Max, tblselectsub.ISelID;
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2004-7-2 00:00:00 | 只看该作者
傻,可以分为几个查询的呀!

点击这里给我发消息

3#
发表于 2004-7-2 00:36:00 | 只看该作者
呵呵,比你这个还要复杂的我也做过,到后来多的无法执行。不得不找其它方法“瘦身”
4#
发表于 2004-7-6 21:49:00 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
5#
发表于 2004-7-24 18:13:00 | 只看该作者
把这个复制到QBE图形查询界面,用SQL语句就是太复杂,但QBE中很好理解和记忆.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-14 14:19 , Processed in 0.088401 second(s), 28 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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