Re: Order by email address by domain ?
От | Frank Bax |
---|---|
Тема | Re: Order by email address by domain ? |
Дата | |
Msg-id | 3.0.6.32.20010510215301.01ec9b50@pop6.sympatico.ca обсуждение исходный текст |
Ответ на | Order by email address by domain ? (Hervé Piedvache <herve@elma.fr>) |
Список | pgsql-sql |
Why is everyone else suggesting new functions? This works (in 6.5.3): ORDER BY lower(substring(email from position('@' in email)+1 )), lower(email) remove the lower() functions if you don't need them (I had mixed case addresses). I am guessing/assuming that it's cheaper to just use entire email address in second key rather than extract before the '@' character. Frank At 08:37 PM 5/10/01 +0200, you wrote: >Hi, > >I just want to order by a listing of email address by domain like : > >toto@aol.com >tutu@aol.com >toto@be.com >tutu@be.com >toto@yahoo.com > >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: herve@elma.fr > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > >http://www.postgresql.org/search.mpl >
В списке pgsql-sql по дате отправления: