Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Left Outer Join
Message
De
09/03/1999 09:03:11
 
 
À
09/03/1999 08:22:59
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00195480
Message ID:
00195489
Vues:
16
>Hi there. I've been outsourced and the data over here is not in that great a shape. I've found that things that should have a one to many relationship, some of the many's are there, but the one is gone (i.e., inventory entries that have no corresponding items table entry). It's really fun :).
>
>Anyway, to play it safe I've decided that I need to use a left outer join and a bit more logic for everything I create, just to cover my butt. I was going to write a routine to do that (since archaic 2.6 doesn't have it to the best of my knowledge :) ) but I thought I'd ask if anyone out here has done something like that already.
>
>Thanks!

Hi Denise,

Most people simulate an Outer Join using the UNION clause, I.e. the main select performs the Inner Join and the UNION adds the records left out from the Inner Join. If I remember correctly ( it's been awhile sincce I did one of these ), the typical syntax is usually something like:

SELECT ... ( your Inner Join parameters );
UNION SELECT ... WHERE YourKey NOT IN ( SELECT YourKey FROM ... )

You might need to play with the parameters and syntax to get it right, or someone else may remember the exact syntax for the UNION.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform