Danke für die Anteilnahme
IBExpert:
Delphi-Quellcode:
select PAYMENT_DATE, sum(PAYMENT), 'dummy' as CAPTION, ID_PAYMENT_TYPE from PAYMENTS where ID_PROCESS in (select ID_PROCESS from PROCESSES where ID_STORE = 2) group by PAYMENT_DATE, ID_PAYMENT_TYPE
...funktioniert -> Ergebnismenge
Delphi-Quellcode:
select * from(
select PAYMENT_DATE, sum(PAYMENT), 'dummy' as CAPTION, ID_PAYMENT_TYPE from PAYMENTS where ID_PROCESS in (select ID_PROCESS from PROCESSES where ID_STORE = 2) group by PAYMENT_DATE, ID_PAYMENT_TYPE
) order by PAYMENT_DATE, SUM desc
Fehler: Token unknown - line 1, column 241.desc.
...wie zu sehen ist, ist da nur ein zusätzliches select drumherum...
Zitat:
aber versucht doch mal SUM(Payment) statt einfach nur SUM
...mit weggelassenem SUM
...) order by PAYMENT_DATE
bekomme ich einen Kommandofehler:
Invalid command.
no column name specified for column number 2 in derived table <unnamed>.