Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select doesn't produce expected results
Message
From
25/10/2012 14:53:42
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01555800
Message ID:
01555816
Views:
37
>
>LEFT is ALWAYS the table from FROM clause (or if you do further JOINs the FIRST table).
>
>
>FROM Table1
>     LEFT JOIN Table2 ON ..
>     LEFT JOIN Table3 ON Table2.Some = Table3.Some
>
>LEFT for the first JOIN is Table1, for the Second JOIN is Table2.
>As Tamar said, the JOIN condition doesn't matters.

Tamar & Borislav - Thank you much. This clears up a misconception I have had for a while. I guess it never came up before because I never used a right join before.

Borislav - You bring up an interesting question. I wanted the second join in your example to be between table1 and table3, would that be possible?



Tamar - This whole discussion originated because I was trying to speed up this query which takes a couple of minutes whereas the other half of my query is similar (and produces more records) but runs almost instantly. The 2 tables are similar in size. Can you suggest why this is the case and how I can speed things up? There are no indexes set.


Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform