Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LEFT JOIN situation need to be resolved
Message
De
18/01/2006 20:13:51
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
LEFT JOIN situation need to be resolved
Divers
Thread ID:
01088255
Message ID:
01088255
Vues:
62
I am trying to know if something is possible. I have a Member table which contains NoSchool and NoSchool2. Those two fields are relational fields of School.dbf. So, a member can be related to two schools. I also have a Video table which contains a relation to a member. So, Video.NoMember exists and can be empty.

The situation I am trying to resolve is to display a video list by showing the school title, if a relation exists. So, normally, if I would only have one field Member.NoSchool, I would be able to do something like this:
SELECT Video.Title,School.Title FROM Video;
 LEFT JOIN Member ON Video.NoMember=Member.Numero;
 LEFT JOIN School ON Member.NoSchool=School.Numero
But, in this case, the relation can come from either Member.NoSchool or Member.NoSchool2. I have a decision process to know which one to take. If Video.Type=1 or Video.Type=2, I will take Member.NoSchool. If Video.Type=3, I will take Member.NoSchool2. Is this possible?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform