davy.cox@gmail.com wrote in
news:1184080130.653524.149390@22g2000hsm.googlegro ups.com:
Quote:
I would like to make an SQL that counts the records resulting
from an other SQL:
>
This is the Query resulting the records (31 in my test)
>
SELECT A.customerid FROM A INNER JOIN customers ON
A.customerid = customers.Customerid WHERE
Left([PeriodeID],8)='20070625' AND customers.Companyid=97
GROUP BY A.customerid;
>
>
I would like just one record result with the total count of
the records in this query: 31
I tried things like:
>
SELECT Count(*) FROM (SELECT A.customerid FROM A INNER JOIN
customers ON A.customerid = customers.Customerid WHERE
Left([PeriodeID], 8)='20070625' AND customers.Companyid=97
GROUP BY A.customerid;)
>
But he keeps on giving me an error on the FROM clause
>
Anyone who can help me, probably supper simple, but I gave up
searching and really can't find it.
>
Thanks in advance
>
>
SELECT count(A.customerid)
FROM A
INNER JOIN customers
ON A.customerid = customers.Customerid
WHERE Left([PeriodeID],8)='20070625'
AND
customers.Companyid=97;
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com