order by problem
order by problem
От:
Simon Moses <ks_moses@yahoo.com>
Дата:
dear sir, when i run a query with order by customer_name i am getting the following result(ex.). AA A B AC i want it to be A B AA AB how to achieve this. thanks in advance. -Simon Moses. ===== ************************** Visit My Home Page http://www.geocities.com/ks_moses updated: 28 Sep 2004. Simon Moses ************************** __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail
Re: order by problem
От:
Tomasz Myrta <jasiek@klaster.net>
Дата:
>dear sir, >when i run a query with order by customer_name i am >getting the following result(ex.). > >AA >A B >AC > >i want it to be > >A B >AA >AB > > It's because of locales. Some special characteres are removed when sorting using locales. I'm not sure, but probably only "C" locale will give results you need. Regards, Tomasz Myrta
Re: order by problem
От:
Richard Huxton <dev@archonet.com>
Дата:
Simon Moses wrote: > dear sir, > when i run a query with order by customer_name i am > getting the following result(ex.). > > AA > A B > AC > > i want it to be > > A B > AA > AB Sorting is down to your locale (the LC_xxx configuration settings). This is set when you initdb your database. It looks to me like you want "C" sorting, so dump your database, re-initdb with --locale=C and restore the dump. There's a whole chapter on localisation in the manuals. Make sure you are clear on the difference between encoding and locale. -- Richard Huxton Archonet Ltd