Sorting varchar w/single digits - Mailing list pgsql-general

From Robert Fitzpatrick
Subject Sorting varchar w/single digits
Date
Msg-id 1092185684.24833.3.camel@columbus.webtent.org
Whole thread Raw
Responses Re: Sorting varchar w/single digits  (<terry@ashtonwoodshomes.com>)
Re: Sorting varchar w/single digits  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
I have varchar column with both numbers and letters, like 1 thru 10 and
5A thru 5G, they are unit numbers for apartments. If I have 1 thru 100,
since it is a varchar field, it sorts like 1,10,11... instead of
1,2,3...

Is there any way to handle this without having to make a sort order
column?

--
Robert


pgsql-general by date:

Previous
From: Josué Maldonado
Date:
Subject: dump/restore from 7.4.3linux to 8beta1 win32
Next
From: Gaetano Mendola
Date:
Subject: Re: Create Table with Foreign Key Error