X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 078DE476341 for ; Wed, 26 Mar 2003 13:09:30 -0500 (EST) Received: from mail.virginia.edu (mail.Virginia.EDU [128.143.2.9]) by postgresql.org (Postfix) with SMTP id B350247632C for ; Wed, 26 Mar 2003 13:09:28 -0500 (EST) Received: from smtp.mail.virginia.edu by mail.virginia.edu id ab06804; 26 Mar 2003 13:06 EST Received: from jlk3xpc (d-128-19-222.bootp.Virginia.EDU [128.143.19.222]) by smtp.mail.Virginia.EDU (8.11.6p/8.11.6) with SMTP id h2QI6Dh32860 for ; Wed, 26 Mar 2003 13:06:13 -0500 Message-ID: <005501c2f3c3$43f8db30$de138f80@virginia.edu> From: Jodi Kanter To: Postgres SQL List Subject: order by Date: Wed, 26 Mar 2003 13:12:30 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0052_01C2F399.5B044EB0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-0.6 required=5.0 tests=ASCII_FORM_ENTRY,BAYES_30,HTML_50_60,HTML_WITH_BGCOLOR version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/584 X-Sequence-Number: 12622 This is a multi-part message in MIME format. ------=_NextPart_000_0052_01C2F399.5B044EB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is there a known problem with the SQL order by clause within postgres versi= on 7.2.3? I am trying to sort a field which holds file names that have some spaces as= well non-alphanumeric characters, including underscores (see below).=20 The results of: select study_name from study order by study_name; Study1a Study 1b Study 1c Study1d The results of sorting in Perl (which uses Linux's underlying sort function) Study 1c Study 1b Study1a Study1d Is there any way around this difference? Blank spaces should show up first = in the sort. Thanks Jodi _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu =20 =20 =20 ------=_NextPart_000_0052_01C2F399.5B044EB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Is there a known problem with the SQL o= rder by=20 clause within postgres version 7.2.3?
I am trying to sort a field which holds= file=20 names that have some spaces as well non-alphanumeric characters, including= =20 underscores (see below).

The results of:
select study_name from study order by=20 study_name;


  Study1a
  Study 1b
  Study&nb= sp;=20 1c
  Study1d


The results of sorting in Perl (which uses= =20 Linux's underlying sort function)

Study  1c
Study=20 1b
Study1a
Study1d

Is there any= way=20 around this difference? Blank spaces should show up first in the=20 sort.
Thanks
Jodi

_______________________________
Jodi=20 L Kanter
BioInformatics Database Administrator
University of=20 Virginia
(434) 924-2846
jkanter@virginia.edu

 

 

 

<= /DIV> ------=_NextPart_000_0052_01C2F399.5B044EB0--