| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 592 人关注过本帖
标题:SQL代码
取消只看楼主 加入收藏
nlt9619
Rank: 1
等 级:新手上路
帖 子:42
专家分:0
注 册:2006-6-20
结帖率:100%
收藏
 问题点数:0 回复次数:0 
SQL代码

问题:
运行后提示SQL语句过长,想改成嵌套格式的,写的代码又错误,看书看得也不太通,谁能帮忙改一下?
Select shuzi From baiwtcp3.dbf Into ARRAY xwj order by zhqw desc
Select shuzi From shiwtcp3.dbf Into ARRAY xqj order by zhqw desc
Select shuzi From gewtcp3.dbf Into ARRAY xbl order by zhqw desc
Select shuzi From shiwp345.dbf Into ARRAY xui order by zhqw desc
Select shuzi From gewp345.dbf Into ARRAY xge order by zhqw desc

Select shuzi From kwtcp3.dbf Into ARRAY xkq order by zhqw desc
Select shuzi From kwp345.dbf Into ARRAY xkh order by zhqw desc
Select shuzi From kwp245.dbf Into ARRAY xkv order by zhqw desc

Select shuzi From hwtcp3.dbf Into ARRAY xhq order by zhqw desc
Select shuzi From hwp345.dbf Into ARRAY xhh order by zhqw desc
Select shuzi From hwp245.dbf Into ARRAY xhv order by zhqw desc


select *;
from p5.dbf ;
where (p5.wjw+p5.qmw+p5.blw)-10*(int(0.1*(p5.wjw+p5.qmw+p5.blw))) in (xhq[1],xhq[2],xhq[3],xhq[4],xhq[5],xhq[9]);
and (p5.gew+p5.uiw+p5.blw)-10*(int(0.1*(p5.gew+p5.uiw+p5.blw))) in (xhh[1],xhh[2],xhh[3],xhh[4],xhh[5],xhq[9]);
and (p5.uiw+p5.qmw+p5.gew)-10*(int(0.1*(p5.uiw+p5.qmw+p5.gew))) in (xhv[1],xhv[2],xhv[3],xhv[4],xhv[5],xhq[9]);
AND p5.wjw in (xwj[1],xwj[2],xwj[3],xwj[4],xwj[5],xwj[10]);
and p5.qmw in (xqj[1],xwj[2],xqj[3],xqj[4],xqj[5],xqj[10]);
and p5.blw in (xbl[1],xbl[2],xbl[3],xbl[4],xbl[5],xbl[10]);
and p5.uiw in (xui[1],xui[2],xui[3],xui[4],xui[5],xui[10]);
and p5.gew in (xge[1],xge[2],xge[3],xge[4],xge[5],xge[10]);
and (max(wjw,qmw,blw)-min(wjw,qmw,blw)) in (xkq[1],xkq[2],xkq[3],xkq[4],xkq[5],xkq[9]);
and (max(uiw,gew,blw)-min(uiw,gew,blw)) in (xkh[1],xkh[2],xkh[3],xkh[4],xkh[5],xkh[9]);
and (max(qmw,uiw,gew)-min(qmw,gew,uiw)) in (xkv[1],xkv[2],xkv[3],xkv[4],xkv[5],xkv[9]);

搜索更多相关主题的帖子: SQL 代码 
2007-03-23 12:31
快速回复:SQL代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.028609 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved