Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging this SQL for the HAVING clause
Message
De
23/06/2006 14:44:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Debugging this SQL for the HAVING clause
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01131279
Message ID:
01131279
Vues:
58
If I do this SQL, it works:
SELECT Affiliate.NoMember,SUM(Affiliate.Amount) AS Amount,MAX(Member.Numero) AS Numero,MAX(Member.FirstName) AS FirstName,;
 MAX(Member.LastName) AS LastName;
 FROM Affiliate;
 INNER JOIN Member ON Affiliate.NoMember=Member.Numero;
 WHERE Affiliate.Period<=ldDate AND Affiliate.NoCheque=0;
 GROUP BY NoMember
But, if I add an HAVING clause, I have an error on the HAVING clause complaining that it is invalid:
SELECT Affiliate.NoMember,SUM(Affiliate.Amount) AS Amount,MAX(Member.Numero) AS Numero,MAX(Member.FirstName) AS FirstName,;
 MAX(Member.LastName) AS LastName;
 FROM Affiliate;
 INNER JOIN Member ON Affiliate.NoMember=Member.Numero;
 WHERE Affiliate.Period<=ldDate AND Affiliate.NoCheque=0;
 GROUP BY NoMember;
 HAVING Amount>100
This is a SQL I have been using for a while. I just can't find what I changed today in it making it to no longer work.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform