Strange SQL statements
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.
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