Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent/child selection problem
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00359337
Message ID:
00359421
Views:
7
Results of some experiments:

I created a table "difference" containing only the IDs of the students who were not being included.

For the following code:


select students.student_id, ;
hs.hs_name, ;
hcontact.sport,; && coach's sport specialty
hcontact.fname, ; && coach name
hcontact.lname, ;
from difference;
inner join students;
on difference.student_id =students.student_id;
inner join hs;
on students.ceeb = hs.ceeb;
left outer join hcontact;
on hs.ceeb = hcontact.ceeb

/

the results include the first coach from any sport where there is a sport (GBK, FB), and .NULL. if the school has no coaches entered. All students are listed.

If I modify the code by adding a coach sport filter at the end:


select students.student_id, ;
hs.hs_name, ;
hcontact.sport,;
hcontact.fname, ;
hcontact.lname, ;
from difference;
inner join students;
on difference.student_id =students.student_id;
inner join hs;
on students.ceeb = hs.ceeb;
left outer join hcontact;
on hs.ceeb = hcontact.ceeb;
where hcontact.sport = 'GVB'
/


The result set is empty. So your comment about the WHERE/HAVING clause is correct. Now, how to get around it?

Neil
Previous
Reply
Map
View

Click here to load this message in the networking platform