Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: More Help Plz
use a decode in the ORDER BY clause (or CASE in versions of oracle that
support it)
i.e.:
select groupno, fname || ' ' ||lname
from groups
order by groupno, decode( position, 'LEADER', 1, 2 ), lname, fname
-- Mark C. Stock email mcstock -> enquery(dot)com www.enquery.com (888) 512-2048 "Mumblez" <mumblez2002_at_btinternet.com> wrote in message news:bo4cpd$gvv$1_at_titan.btinternet.com...Received on Sun Nov 02 2003 - 20:09:52 CST
> sorry need some more help, i have a table with group members names and one
> of them is the group leader, i have 5 groups and wish to display them with
> the group leader at the top and the members of the group below them in
> aphabetical order
>
> for example
>
> leader group members
> 0001 bill bloggs
> bill adams
> dave collins
> peter smith
> 0002 john mason
> steve bassett
> mike french
> donna welsh
> 0003 brian phillips
> bill hadley
> martin taylor
>
>
> get the idea...............any help with the sql will be greatly
appreciated
>
> Thank you
>
>
![]() |
![]() |