| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2971 人关注过本帖
标题:三个表,在三个相同的字段中找出相同的行
只看楼主 加入收藏
yd1954
Rank: 2
来 自:辽宁沈阳
等 级:论坛游民
帖 子:143
专家分:21
注 册:2016-7-1
收藏
得分:0 
回复 9楼 sdta
图片文档.pdf (2.81 MB)
2019-07-02 16:27
xuminxz
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:41
帖 子:763
专家分:2503
注 册:2011-5-8
收藏
得分:0 
不把表发上来,起码把完整的命令发上来呀。试试下面的命令。
select a.* from  表1 a , 表2, 表3 c into dbf  结果 where  a.h1=b.h1 and a.h2=b.h2 and a.h3.=b.h3 and a.h1=c.h1 and a.h2=c.h2 and a.h3.=c.h3 and c.h1=b.h1 and c.h2=b.h2 and c.h3.=b.h3

dBase有人接盘了。
2019-07-02 17:25
sdta
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:江苏省连云港市
等 级:版主
威 望:335
帖 子:9798
专家分:26886
注 册:2012-2-5
收藏
得分:0 
没有表如何解决问题

坚守VFP最后的阵地
2019-07-02 18:22
sdta
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:江苏省连云港市
等 级:版主
威 望:335
帖 子:9798
专家分:26886
注 册:2012-2-5
收藏
得分:0 
create cursor t1 (h1 n(1), h2 n(1), h3 n(1))
insert into t1 values (0, 1, 2)
insert into t1 values (1, 2, 3)
insert into t1 values (2, 3, 4)
create cursor t2 (h1 n(1), h2 n(1), h3 n(1))
insert into t2 values (2, 3, 4)
insert into t2 values (0, 1, 2)
insert into t2 values (2, 3, 1)
create cursor t3 (h1 n(1), h2 n(1), h3 n(1))
insert into t3 values (2, 3, 4)
insert into t3 values (3, 4, 5)
insert into t3 values (0, 1, 2)

select t1.h1, t1.h2, t1.h3 from t1, t2, t3 where ;
str(t1.h1) + str(t1.h2) + str(t1.h3) == str(t2.h1) + str(t2.h2) + str(t2.h3) and ;
str(t1.h1) + str(t1.h2) + str(t1.h3) == str(t3.h1) + str(t3.h2) + str(t3.h3) order by t1.h1, t1.h2, t1.h3

坚守VFP最后的阵地
2019-07-02 18:41
yd1954
Rank: 2
来 自:辽宁沈阳
等 级:论坛游民
帖 子:143
专家分:21
注 册:2016-7-1
收藏
得分:0 
回复 9楼 sdta
这几天出门了。才回来。非常感谢您的帮助。以后有问题还得请教您。
2019-07-07 16:01
gs2536785678
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:45
帖 子:601
专家分:1770
注 册:2017-7-16
收藏
得分:0 
诚意不足,你既然来请教,就应当拿出数据啊。。。
2019-07-10 09:51
快速回复:三个表,在三个相同的字段中找出相同的行
数据加载中...
 
   



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

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