Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying matching records in 2 tables
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Querying matching records in 2 tables
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00959135
Message ID:
00959135
Views:
38
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
Next
Reply
Map
View

Click here to load this message in the networking platform