Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Join Confusion
Message
De
10/06/1999 11:16:47
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00228381
Message ID:
00228412
Vues:
13
Then shouldn't you be able to do this with:
select * from soskid, somast, sotran, arcust, soaddr, highskid, netwts ;
where soskid.id = somast.id and soskid.id = sotran.id {{{etc}}}
I could be wrong...

>First match? There's only 1 match, so I don't know where first comes into it.
>
>Each record in sowgts has
>* a skid in soskid
>* a sales order in somast
>* a line item in sotran
>* a customer in arcust
>* an address in soaddr
>* a highest numbered skid in highskid
>* a net weight in netwts
>
>I just want to put all of this info into the same record. What would I group by? There's no groups?
>
>Thanks,
>
>Michelle
>
>
>>There is no join condition that will give you only the first match of the child table. You will need a GROUP BY of some sort.
>>
>>HTH
>>
>>>I'm trying to figure out what kind of joins to use here.
>>>
>>>
>>>   FROM sowgts ;
>>>       ????? JOIN soskid ON sowgts.skidkey = soskid.skidkey ;
>>>       ????? JOIN somast ON sowgts.sono = somast.sono  ;
>>>       ????? JOIN sotran ON somast.sono = sotran.sono ;
>>>       ????? JOIN arcust ON sotran.custno = arcust.custno ;
>>>       ????? JOIN soaddr ON somast.sono = soaddr.sono ;
>>>       ????? JOIN highskid ON soskid.bolno = highskid.bolno ;
>>>       ????? JOIN netwts ON soskid.skidkey = netwts.skidkey
>>>
>>>
>>>For each record in sowgts, I want one record in the final product. I tried all LEFT OUTERs, but I ended up with a bunch of records. What kind of joins should I use to get one record?
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform