Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using records form table to filter another
Message
 
To
04/11/1999 13:38:42
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00287004
Message ID:
00287035
Views:
22
Peter,

What you asking about is called a self join and yes it can be done. Here's an example;
SELECT Aa.Fld4, Aa.Fld5, Aa.Fld6 ;
  FROM MyTable Aa ;
  JOIN MyTabl Ab ;
    ON Aa.Fld1 = Ab.Fld1 ;
 WHERE Ab.Fld1 = "Blue" ;
 INTO CURSOR MyResult
Of course this example is not really that good because the following query gets the same results;
SELECT Fld4, Fld5, Fld6 ;
  FROM MyTable 
 WHERE Fld1 = "Blue" ;
 INTO CURSOR MyResult
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform