Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Querying matching records in 2 tables
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Querying matching records in 2 tables
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00959135
Message ID:
00959135
Vues:
39
All,

I have 2 tables namely modacad and planning. Each table has an identifier named mainkey. There is a one to many relationship between these 2 tables meaning that there is only 1 record of that mainkey in the modacad table and in planning there could be more than 1 record with the same mainkey. I want to query where the mainkey in modacad is equal to SS2005 and a logical field mochk002=.f. . Therefore what I would expect is to list all records in modacad that mochk002 is false and the corresponding records in planning. I think I need a join but I cannot get it to work. Can anybody help me with my syntax please?
select mainkey, planextra1, comments ;
from  planning ;
where modacad.mochk002=.f. and modacad.mainkey=planning.mainkey ;
into cursor crsresult
Any help would be much appreciated
Neil Lewis
IT R&D Manager
Velmore Ltd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform