Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using JOIN ON vs WHERE
Message
De
13/01/2009 15:02:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Using JOIN ON vs WHERE
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01373343
Message ID:
01373343
Vues:
79
I have the following query
SELECT fieldlist GROUP BY etc.;
FROM PoItems ;
        INNER JOIN PoMain ON pomain.ponum = poitems.ponum ;
        INNER Join SupInfo On PoMain.UniqSupNo = SupInfo.UniqSupNo ;
        INNER join Newfields ON newfields.uniq_key = PoItems.Uniq_key ;
        LEFT Outer Join PoItSchd On PoItems.UniqLnNo = PoItSchd.UniqLnNo ;
   WHERE PoItems.uniq_key = lcUniqKey AND Not EMPTY(PoItems.ponum) AND NOT poitems.lCancel;
   HAVING cond
I typically try to write my queries so that the JOIN parts only show the joining criteria and put selection criteria into WHERE

In this case, would it be better to move any/all parts of the WHERE clause into the JOIN?

In this case, execution speed is not really a consideration but I'm wondering if there is a potential difference in the result set.

Thanks to all.........Rich
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform