Re: Nested sort, trying again

From: vc <boston103_at_hotmail.com>
Date: 3 Oct 2005 18:44:49 -0700
Message-ID: <1128390289.862096.13000_at_g14g2000cwa.googlegroups.com>


Vadim Tropashko wrote:
> vc wrote:
> > >
> > > Either way, there is little sence elaborating this idea in oracle, as
> > > the OP is evidently using some other RDBMS. If it's sybase anywhere, or
> > > mysql, then ordering should be already taken care of in the syntax.
> >
> > Could you elaborate on those two ?
>
> I lost the reference to Sybase LIST aggregate function definition, but
> remember that it admits "order by" clause like this
>
> select deptno, LIST(ename order by sal)
> ...

Thanks,

I found it:

SELECT LIST( emp_id ORDER BY emp_lname ) AS "Sorted IDs" FROM EMPLOYEE
GROUP BY dept_id

More elegant, than Oracle's collect.

Yes, it would simplify your example, but would not improve its performance, though ;) Received on Tue Oct 04 2005 - 03:44:49 CEST

Original text of this message