Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The dreaded OUTER,INNER,LEFT,RIGHT join question
Message
De
25/02/2000 08:33:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00337397
Message ID:
00337402
Vues:
15
SELECT x.*,y.* FROM x LEFT OUTER JOIN y ON x.key = y.key

Try that :-)

>OK, I know I should understand the whole left,right, inner, outer crud, but my brain is full of other things more important, at least until I need it. Here is my question I have a parent table x and a child table y. y is linked to x on key1. What I need is one SQL select that will find all the children that meet a certain criteria and report the values, but for those x's where there are no children y I need to show the data from parent x and blanks for the field from child y. Can anyone help me on this as my head is hurting from hitting the brick wall.
>
>Table x
>field x.Key1
>field x.Document_Number
>
>Table y
>field y.Key1
>field y.Delivery_Date
>field y.Delivery_Name
>
>I need to see all the deliveries for a certain document number, but I need to also see when a document number has not been delivered yet. In one SQL select
>
>TIA
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform