Re: [GENERAL] Sorting varchar w/single digits

2004-08-10 Thread Michael Fuhr
On Tue, Aug 10, 2004 at 08:54:45PM -0400, Robert Fitzpatrick wrote: > 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... > >

Re: [GENERAL] Sorting varchar w/single digits

2004-08-10 Thread terry
rom: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Robert > Fitzpatrick > Sent: Tuesday, August 10, 2004 8:55 PM > To: PostgreSQL > Subject: [GENERAL] Sorting varchar w/single digits > > > I have varchar column with both numbers and letters, like 1 > thru 10 and > 5A

[GENERAL] Sorting varchar w/single digits

2004-08-10 Thread Robert Fitzpatrick
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? --