sort result according to letter list

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
rhaynes
Forum Newbie
Posts: 18
Joined: Mon Nov 08, 2004 8:32 am

sort result according to letter list

Post by rhaynes »

Hi, I am trying to build a postgresql query which will order returns based on a letter list, not alphabetically.

For example I would like returns arranged by the first letter of the word based on the list

{G,V,E,N,M}

so that Elephant, Goat, Mother, Nan, Violin would be arranged as

Goat,Violin,Elephant,Nan,Mother.

Thanks,
R Haynes
Post Reply