找出在另一个表所包含的项
A表 B表字段ZDA 字段ZDB
11 123
22 322
33 345
通过一语句或程序,找出A表ZDA字段包含于B表ZDB字段的行(其结果应为22)。另,VF6能否实现,谢谢!
CREATE CURSOR TABNAMEa (ZDA C(2)) FOR I=1 TO 3 INSERT INTO TABNAMEa VALUES (TRANSFORM(I)+TRANSFORM(I)) ENDFOR CREATE CURSOR TABNAMEb (ZDB C(3)) INSERT INTO TABNAMEb VALUES ("123") INSERT INTO TABNAMEb VALUES ("322") INSERT INTO TABNAMEb VALUES ("345") SELECT A.ZDA,B.ZDB FROM TABNAMEa A,TABNAMEb B WHERE OCCURS(A.ZDA,B.ZDB)>0