Hi,

Having some more problems with the sql. 

Here it is..

SELECT icaref, id, date, payee, descript, disb, payment, receipt-payment, receipt, 
SUM(disb), SUM(receipt-payment),
FROM data
WHERE SUM(receipt-payment) != 0 AND date BETWEEN 'varStart' AND 'varEnd' OR icaref 
LIKE '%varRef%'  GROUP BY icaref, disb, receipt-payment
ORDER BY date


MYSQL tells me that there is invalid use of the groups function.

I am trying to get the sum of balance-reciept , with icaref as being the common 
identifier to group them by.

Help appreciated!

Thanks,

James Cox
*-----------------------------------------------------------------------*
| James Cox                                                                         |
| Associate Product Manager, Custom Directory                       |
| Wherewithal, Inc.                            +44-7968-349990 (vox) |
| [EMAIL PROTECTED]                  +44-1992-300939 (fax) |
*-----------------------------------------------------------------------*

Reply via email to