Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent/child selection problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00359337
Message ID:
00359421
Vues:
8
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform