Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HAVING clause check?
Message
 
 
À
08/05/2008 22:37:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01315930
Message ID:
01316007
Vues:
19
Yes, I'm sure and you're correct too. :)
In a regular query HAVING is applied after GROUP BY and before ORDER BY. In UNION query HAVING can only be applied to individual SELECTS not the final recordset. Only ORDER BY is applied to the final recordset.

but in UNION query it's aplied to individual record sets not the final recordset produced by the query.

>Are you sure about that, Sergey? I thought that HAVING was applied after almost all other criteria in the SELECT clause; that is, applied to the preliminary result set and that was the difference between HAVING and WHERE.
>
>>No, only ORDER BY clause is applied to the whole result set. The HAVING clause is applied to each query in UNION. You can use derived table to apply additional conditions
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform