here's an idea:
if you would have all emails stored in the reverse order:
moc.niamod@resu
then all you would need is simple 'ORDER BY email'.
Also, in this way, emails like [EMAIL PROTECTED] would be perfectly
ordered.
Is that a crazy thought?
If not yet then: why not to add an additional field to the table with the
reverse domain only? (after an @) ordering by it. INDEX would also be
simple.
now is crazy? Then, is there any such function in PostgreSQL? With C it
would be so easy and fast.
Cheers!
Maxim Maletsky
-----Original Message-----
From: Hervé Piedvache [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 3:38 AM
To: [EMAIL PROTECTED]
Subject: [SQL] Order by email address by domain ?
Hi,
I just want to order by a listing of email address by domain like :
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Is it possible and how ?
Thanks !
--
Hervé Piedvache
Elma Ingenierie Informatique
6, rue du Faubourg Saint-Honoré
F-75008 - Paris - France
http://www.elma.fr
Tel: +33-1-44949901
Fax: +33-1-44949902
Email: [EMAIL PROTECTED]
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]