Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Records missing from SQL query
Message
 
 
À
30/04/2004 15:15:50
Steven Kleypas
Tarrant County College District
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00899906
Message ID:
00899908
Vues:
20
This message has been marked as the solution to the initial question of the thread.
Use LEFT OUTER JOIN
LEFT JOIN contacts ;
>With the following SELECT STATEMENT:
>SELECT courses.ctitle,students.clastname,agencies.cagencyname,contacts.ccontact ;
>   FROM courses ;
>   JOIN students ;
>      ON students.icourseid = courses.iid ;
>   JOIN agencies ;
>      ON agencies.iid = students.iagencyid ;
>   JOIN contacts ;
>      ON contacts.iid = students.icontactid ;
>   WHERE courses.iid = 1 ;
>   ORDER BY students.clastname
>If students.icontactid is empty, no record is returned at all. How do I get a record to be returned with an empty value for contacts.ccontact?
>
>Thanks in advance!
>
>Steve
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform