Subject | OrderingItems bug with GroupBy? |
---|---|
Author | Marco Menardi |
Post date | 2003-03-10T00:42:57Z |
Hi, IBO 4.2i
I've the query:
SELECT FORNITORI.FORNITORE_ID
, FORNITORI.DESCRIZIONEDISP
, SUM(SCADENZIARIO.TOT_CHIUSO - SCADENZIARIO.TOT_APERTO) AS SALDO
FROM FORNITORI
INNER JOIN SCADENZIARIO ON (FORNITORI.FORNITORE_ID =
SCADENZIARIO.FORNITORE_ID)
GROUP BY FORNITORI.FORNITORE_ID, FORNITORI.DESCRIZIONEDISP
"FORNITORE_ID" is qualified with the table name to avoid ambiguities.
In the OrderingItems, I've put:
CODICE=FORNITORI.FORNITORE_ID;FORNITORI.FORNITORE_ID DESC
But when I order with that item, the exception that "FORNITORE_ID" is
ambiguous between table FORNITORI and SCADENZIARIO is raised.
With SQLMonitor I've found that IBO sends a simple:
ORDER BY FORNITORE_ID ASC
Instead of what I wrote in OrderingItems, i.e.
FORNITORI.FORNITORE_ID
Is it a bug or am I missing something?
Of course, if I use position number it works good (i.e. CODICE=1;1 DESC)
Regards
Marco Menardi
I've the query:
SELECT FORNITORI.FORNITORE_ID
, FORNITORI.DESCRIZIONEDISP
, SUM(SCADENZIARIO.TOT_CHIUSO - SCADENZIARIO.TOT_APERTO) AS SALDO
FROM FORNITORI
INNER JOIN SCADENZIARIO ON (FORNITORI.FORNITORE_ID =
SCADENZIARIO.FORNITORE_ID)
GROUP BY FORNITORI.FORNITORE_ID, FORNITORI.DESCRIZIONEDISP
"FORNITORE_ID" is qualified with the table name to avoid ambiguities.
In the OrderingItems, I've put:
CODICE=FORNITORI.FORNITORE_ID;FORNITORI.FORNITORE_ID DESC
But when I order with that item, the exception that "FORNITORE_ID" is
ambiguous between table FORNITORI and SCADENZIARIO is raised.
With SQLMonitor I've found that IBO sends a simple:
ORDER BY FORNITORE_ID ASC
Instead of what I wrote in OrderingItems, i.e.
FORNITORI.FORNITORE_ID
Is it a bug or am I missing something?
Of course, if I use position number it works good (i.e. CODICE=1;1 DESC)
Regards
Marco Menardi