Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Make ORDER BY in a view?
However, if for either technical, or political, or economic reasons you cannot
change the code in the system that is issuing the original SELECT statement,
then you have to take measures in the database to accomplish what the user
really wants.
Mungo Henning wrote:
>
> KeyStroke (Jack L. Swayze Sr.) wrote:
>
> > the trick to all this is that GROUP BY will order the result, just as
> > well as ORDER BY will. and you _CAN_ have a GROUP BY in a view!
>
> Whilst not contradicting this nice work-around, how stable is the
> postulated solution?
> As I (badly?) understand it, "group by" clusters records according to
> some condition. The clustering may be implemented by sorting, but it
> needn't always be so. Hence the separate "group by" and "order by"
> clauses.
> What would happen if a new "group by" mechanism were to be invented
> a few weeks after you've rolled out your application and you had
> assumed that "group by" performed an "order by"...
> Whether this is likely is your call, but personally I'd be cautious
> of such effects lest they disappear from under my feet in a future
> version.
> As another poster said, one ultimate ORDER BY may be all that is
> necessary.
>
> Mungo Henning
--
You can email me by removing the _NO_SPAM_ in the email address. Make sure you
remove all three underscores.
Received on Sun Dec 13 1998 - 09:41:17 CST
![]() |
![]() |