![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
If I have a query which has both 'group by' and 'order by' clauses AND the ordering is on a column which is NOT part of the grouping it appears to stop the 'grouping by' completely silently. Eg. select g.pid from gobz g group by g.pid order by g.tsig |
#4
| |||
| |||
|
|
If I have a query which has both 'group by' and 'order by' clauses AND the ordering is on a column which is NOT part of the grouping it appears to stop the 'grouping by' completely silently. Eg. select g.pid from gobz g group by g.pid order by g.tsig If you drop the order by clause or change it to use a column in the grouping then it will function as you'd expect. I have castigated the programmer! But whats the consensus out there...Is this a bug or should he have gotten an error from the system or is this expected behaviour? |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
pid | +-------------+ 1| 2| 1| 2| +-------------+ |
|
pid | +-------------+ 1| 2| +-------------+ |
#7
| |||
| |||
|
|
If I have a query which has both 'group by' and 'order by' clauses AND the ordering is on a column which is NOT part of the grouping it appears to stop the 'grouping by' completely silently. Eg. select g.pid from gobz g group by g.pid order by g.tsig |
#8
| |||
| |||
|
#9
| |||
| |||
|
#10
| |||
| |||
|
|
Hi Marty, if you posted ingres output, you found a bug in ingres. The original statement doesn't make sense, as Roy and Celko already pointed out. My small example was intended to show this (and that's why I asked for the _expected_ result, not the result ingres produces). I already saw your message that you reported this behaviour as a bug. Regards, Ronald |
![]() |
| Thread Tools | |
| Display Modes | |
| |