----- Original Message -----
I am trying to get aTable of "amount"s over a 21 day period.
I think that the problem is theEnddate:
Gluctmp1.date + 20
Even though [Gluctmp1.date + 20] is a valid date, SELECT
I get the [unrecognized command] error with this:
SELECT Gluctmp1.date, COUNT(Gluctmp1.amount);
FROM Gluctmp1;
WHERE ;
Gluctmp1.category = "Glucos";
Gluctmp1.date BETWEEN Gluctmp1.date AND (Gluctmp1.date + 20) ;
GROUP BY Gluctmp1.date
Hello !
It's very easy with an autojoin :
[VFP]
SELECT ;
aa.date,;
SUM(bb.nb) ;
FROM ;
(SELECT DISTINCT ;
date ;
FROM ;
Gluctmp1) ;
as aa,;
(SELECT ;
date,;
COUNT(*) as nb ;
FROM ;
Gluctmp1 ;
WHERE ;
Gluctmp1.category = "Glucos" ;
GROUP BY ;
date) ;
as bb ;
WHERE ;
BETWEEN(bb.date,aa.date,aa.date+20) ;
GROUP BY ;
aa.date
[/VFP]
Gérard.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/CE3AADDF07034E06BFC1127F835FD4BE@MuriellePC
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.