Re: Sorting on a partial email address



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);

--
HTH
pDale
.


Quantcast