Strange SQL statements

edited 11:38PM in FastReport 3.0
In FastReport query's (IBXQuery, ADOQuery) a SQL like

select factuurid, factuurdatum, sum(totaalbedrag), sum(btwbedraglaag), sum(btwbedraghoog),
sum(brutobedrag)
from factuur
where jaar = ;) 1
and periode = ;) 2
order by factuurdatum

does not work, but :

select sum(totaalbedrag), sum(btwbedraglaag), sum(btwbedraghoog),
sum(brutobedrag)
from factuur
where jaar = ;) 1
and periode = ;) 2
order by factuurdatum

does work.

It seems to me that it is not allowed to use single attributes at the same time with sum, avg and so on.

- WHY
- How to solve this ?

Greetings.

MBSoft.

Comments

  • edited 11:38PM
    Seems it's not a FR problem - try this with TIBQuery or TSQLQuery.

Leave a Comment