Try as I might I cannot get the 'Where' statement to accept text selecting only Invoiced Value greater than zero, it does not like the 'sum' part of the calculation - any ideas?
SELECT
t0.cardcode as 'Customer Code',
t0.cardname as 'Customer name',
sum(t0.doctotal-t0.vatsum) as 'Invoiced Value'
FROM
oinv t0
inner join ocrd t1 on t0.cardcode = t1.cardcode
WHERE
t0.docdate between [%1] and [%2]
GROUP BY
t0.cardcode,
t0.cardname
ORDER BY
t0.cardcode
Thanks,
Robin