Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Nested sort, trying again

Re: Nested sort, trying again

From: vc <boston103_at_hotmail.com>
Date: 3 Oct 2005 18:44:49 -0700
Message-ID: <1128390289.862096.13000@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 Mon Oct 03 2005 - 20:44:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US