Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using JOIN ON vs WHERE
Message
From
13/01/2009 15:02:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Using JOIN ON vs WHERE
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01373343
Message ID:
01373343
Views:
71
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
Next
Reply
Map
View

Click here to load this message in the networking platform