Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Syntax
Message
 
 
To
13/03/2006 17:12:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01103938
Message ID:
01104127
Views:
21
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform