PDA

View Full Version : order by clause



yash
Jul 20th, 2006, 06:09 PM
hello all,

i have the following surnames

macdonald
madonald
mcdonald


i want to be sorted as
macdonald
mcdonald
madonald

coz in englans even though the surname is different we pronounce as mac so please reply

guelphdad
Jul 22nd, 2006, 02:53 AM
What database are you using?

Beagle
Jul 24th, 2006, 04:42 PM
you can't order by pronunciation to the best of my knowledge. That's why written and spoken language are different. If you want to sort by pronunciation, then you need to store things in their pronunciation symbols. But really, who sorts by pronunciation? If I had to find someone's name, with two known possible spellings, I'd look in the lexically sorted places I'd expect them to be in.

Pick your battles wisely.

guelphdad
Jul 25th, 2006, 12:25 AM
If you are using mysql you can use SOUNDEX to order them. I just don't know if they would order that exact way.