Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding SQL Select
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01385138
Message ID:
01385152
Vues:
43
Hi Dmitry,

You can use the where condition on the second table and use it as a derived table, e.g.
select * from myTable LEFT JOIN (select * from mySecondTable where ...) mySecond ON ...
BTW, I have a strange feeling we discussed the same problem already with you. Did I dream out about it? Sometimes I have dreams that happen in the real life later...

>Hi,
>
>Here is a pseudo SQL Select statement:
>
>
>select field1, field2, ... from Table1 left join Table2 on Table1.fieldX = Table2.fieldX where (Long Expression)
>
>
>From running this type of SQL Select and analyzing results, it seems to me that VFP will first do the LEFT JOIN and then apply the WHERE condition to the resulting query. Is this correct?
>
>My question is, how do you make the SQL Select to select records from Table1 based on the Long Expression and then LEFT JOIN the resulting query?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform