pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
order by problem
3+ messages / 3 participants
[nested] [flat]

* order by problem
@ 2004-12-01 06:14  Simon Moses <ks_moses@yahoo.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Simon Moses @ 2004-12-01 06:14 UTC (permalink / raw)
  To: pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: order by problem
@ 2004-12-02 07:18  Tomasz Myrta <jasiek@klaster.net>
  parent: Simon Moses <ks_moses@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Tomasz Myrta @ 2004-12-02 07:18 UTC (permalink / raw)
  To: Simon Moses <ks_moses@yahoo.com>; +Cc: pgsql-sql


>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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: order by problem
@ 2004-12-02 09:03  Richard Huxton <dev@archonet.com>
  parent: Simon Moses <ks_moses@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Richard Huxton @ 2004-12-02 09:03 UTC (permalink / raw)
  To: Simon Moses <ks_moses@yahoo.com>; +Cc: pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-12-02 09:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 06:14 order by problem Simon Moses <ks_moses@yahoo.com>
2004-12-02 07:18 ` Tomasz Myrta <jasiek@klaster.net>
2004-12-02 09:03 ` Richard Huxton <dev@archonet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox