From: | <operationsengineer1(at)yahoo(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Sorting Challenge |
Date: | 2005-08-30 22:58:40 |
Message-ID: | 20050830225840.62837.qmail@web33315.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
hi all,
i have another sorting problem. i have data that
looks like...
sm2
sm101
i have a lot more data like this, but i want to keep
it simple. the first two alphas represent an area and
the foloowing digit(s) represent a unique id.
the data is currently held in a text field.
i'm using (this is trimmed down)...
$sql_ipc_defect_code = 'SELECT code, code || \' - \'
|| description FROM defect ORDER BY LOWER(code) ASC';
this will list sm101 prior to sm2, which i think it
expected given my current order scheme. but it isn't
what i want.
is there a way to sort this so that sm2 will come
before sm101? do i need to change my data types?
tia...
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-08-30 23:14:36 | Re: Copy function syntax on 8.1 |
Previous Message | Bruce Momjian | 2005-08-30 22:57:14 | Re: Copy function syntax on 8.1 |