Strange SQL statements

edited 10:26PM 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 10:26PM
    Seems it's not a FR problem - try this with TIBQuery or TSQLQuery.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.