Toad World® Forums

Sort bug when using aggregation function with order by

Hi,

on Toad for Oracle 12.5.0.99 32bit I have the following behaviour which I believe is a bug:

  1. Execute the following example in an editor (F9)

SELECT DUMMY,
LISTAGG(DUMMY, ‘,’) WITHIN GROUP (ORDER BY DUMMY) DUMMYLIST
FROM DUAL
GROUP BY DUMMY;

  1. Click on one of the result columns and sort the result.

This results in a ORA-30491: ORDER BY-Klausel fehlt (missing ORDER BY clause).

I assume that Toad removes the order by in the aggregation function before appending its own at the end of the statement.

Regards Nick

12.6.0.24 is fixed:

Hi,

I have now installed 12.6.0.53. As I already expected the bug is not fixed. Seems that Mr. Vadas has some kind of different setup…

To reproduce please execute the query above and then click on the result column header and sort the result in Toad.

Maybe someone from Dell can have a look at this?

Regards

Nick

>and then click on the result column header and sort the result in Toad.
This is something quite new for me, something that I haven’t seen before … sorry for miss spelling your words.

:slight_smile:

Cheers