Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: order by clause

  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    order by clause

    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

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,634
    Thanks
    4
    Thanked 148 Times in 139 Posts
    What database are you using?

  • #3
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    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.

  • #4
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,634
    Thanks
    4
    Thanked 148 Times in 139 Posts
    If you are using mysql you can use SOUNDEX to order them. I just don't know if they would order that exact way.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •