Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Join Table Question!
Message
De
02/03/1998 01:32:23
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Join Table Question!
Divers
Thread ID:
00082019
Message ID:
00082019
Vues:
58
First of all, I show the relation between tables(entity),
then, I would like to know how to join them!!

TableName Keys (OThers Field)
----------------------------------------------
Quotation QUO__NO quo_date..., Cust_NO(FK)
QuoLine QUO__NO, ITEM qty...
Spprice CUST_NO, ITEM spfob_hk
ITEM ITEM description..., fob_hkd

Spprice means A lookup Table which use a Special Price other than
the original price of Quotation or Order!

In Views,
if 2 Tables ( Quotation & Spprice )
Inner Join Quotation.Cust_NO = Spprice.Cust_no

Result Recno is 1566!! OK

if 2 Tables ( Quotation & Quoline )
Inner Join Quotation.QUO__NO = QuoLine.QUO__NO

Result Recno is 3263!! OK

if 3 Tables (Quotation & Spprice & QuoLine )
Inner Join Quotation.QUO__NO = QuoLine.QUO__NO {AND/OR/.NULL.}
Inner Join Quotation.CUST_NO = Spprice.Cust_NO

Either and, or, nothing still Result Recno is Zero!! :~~~(
In Logic, The Data match match according to the Customer in Spprice
to carry the respond QuoLine item on further match!

First problem is already got nothing here, because there should be a
additional link to make the item match!!

If adding ITEM Table, the view sometimes can give 19K or even 23K
records but around 20 times are duplicate!!
if use, Select Distinct ... Recno back to 1566 again!
But Already waste 90 seconds to make a query....
Of cos, too slow!
But how to solve this mixing Table relationship?!

Original Spec.:
If Customer has another new agreement on price,
make up a new Table SPPRICE to carry the cust_no, Item, Special Price,
and also reason etc.
An Order or Quotation has a UniQue Link Cust_no to Customer Table.
An Order or Quotation has 1-many Link to ORderline or QuoLine respectively!

So, should all linked but got nothing!!

I want to know what is the difference between Inner Join and
Where 'Equal'??

What are the time consuming on different join??
And What possible reason I got nothing when join all??!!

If fail to join, I can put them out on report!!

Thanks Read!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Répondre
Fil
Voir

Click here to load this message in the networking platform