Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select doesn't produce expected results
Message
De
25/10/2012 14:53:42
 
 
À
25/10/2012 14:34:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01555800
Message ID:
01555816
Vues:
36
>
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform