Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging this SQL for the HAVING clause
Message
From
23/06/2006 14:44:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Debugging this SQL for the HAVING clause
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01131279
Message ID:
01131279
Views:
57
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
Next
Reply
Map
View

Click here to load this message in the networking platform