Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Syntax
Message
 
 
À
13/03/2006 17:12:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01103938
Message ID:
01104127
Vues:
20
The LEFT join s is the key. The rest depends on your tables structire and result you want to get.

>
>I think I've got it:
>
>
>SELECT rfq.*, ;
>		rfqdetail.rqd_desc, rqd_Linenum, rqd_needby, rqd_reqnum, rqd_qty,;
>		quotes.quo_freight, quo_portother, quo_date, quo_daysvalid,;
>		quotedetails.qud_delivery, qud_unitcost, ;
>		Suppliers.sup_name, sup_pk;
>	FROM rfq INNER JOIN rfqdetail ON rfq_pk = rqd_rfqfk;
>	INNER JOIN rfqsuppliers ON rfq_pk = rqs_rfqfk;
>	LEFT JOIN Suppliers ON rqs_suppfk = sup_pk;
>	LEFT JOIN quotes ON rfq_pk = quo_rfqfk AND quo_suppfk = rqs_suppfk;	
>	LEFT JOIN quotedetails ON rqd_pk = qud_rqdfk AND quo_pk = qud_quotefk;
>	ORDER BY sup_Name, rqd_LineNum
>
>
>Got to do some testing to make sure it's correct, but so far it looks good.
>
>Thanks for your time.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform