Re: Sorting on a partial email address



"pDale" <pdalec@xxxxxxxxx> wrote in message
news:5494c3ae05071816175d28e31f@xxxxxxxxxxxxxxxxx
On 7/18/05, Robert <catcher@xxxxxxxxxxxxx> wrote:
> I am pulling out users (name + email) and I need to sort the list by
> everything after the @ sign in the email address. I wasn't sure which
group
> to post to.
>
> I am pulling them into an excel spread*** from Oracle. I wasn't sure at
> what point the sort should happen (except sometime before it writes to the
> xls). : )

How about:

SELECT eaddr
FROM db
ORDER BY substr( eaddr, instr( eaddr, '@')+1);

--

That was perfect! Sorry if this was in the wrong group.

Robert


.