Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 8i vs 9i: Difference in "group by" ?
In article <ad8fnv$6i8$06$1_at_news.t-online.com>, Andreas says...
>
>Hi,
>
>is there some known difference in the group by directive
>between 9i and 8i?
>
>We have an application that runs well on 7.3 to 8i.
>One customer tried it on a 9i, and it seems a statement like
>
>select Decode(...about 3 lines of code...),foo
>from tblFoo
>group by Decode(...about 3 lines of code...)
>
>is GROUPED by the decode statement, but not ORDERED by it.
> From our previous experiences GROUP allways caused an
>ORDER (unless overwritten with an explizit ORDER BY) - is
>this "unofficial" behaviour, or is the missing ordering
>a bug?
>
group by NEVER had to sort -- I can give you examples all of the way back to 7.0 whereby the group by doesn't sort.
It never had it.
It never was assured.
The *only* way -- repeat -- the ONLY way to get an ordered result set is .... to use ORDER BY.
Here is a really old posting from 1998 where we had an interesting discussion on this very topic:
http://groups.google.com/groups?selm=36841a07.21358221%40192.86.155.100&output=gplain
the entire thread is:
....
>(well, we will probably use that chance to clean up
>that code a bit, using a view instead...)
>
>--
> Andreas
>if ((sex==fem)&&(hobby==comp)&&(age~25)&&(status==single)
>&&(cntry=GER)) goto http://www.kochandreas.com/home/single.htm
>
-- Thomas Kyte (tkyte@oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Fri May 31 2002 - 15:25:54 CDT
![]() |
![]() |