sort text field numerically

From: "Frank Morton" <fmorton(at)base2inc(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: sort text field numerically
Date: 2002-05-14 12:23:53
Message-ID: 020101c1fb42$3665f770$8455e5ce@edison
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a table with a column called "weight" that
is a text field, but in this case, contains float values,
such as ".8" or "0.25". Might also be null.

How can I sort them in numeric order instead of
textual order? Thanks.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joel Burton 2002-05-14 12:27:12 Re: date_part, how to use
Previous Message D'Arcy J.M. Cain 2002-05-14 12:07:05 Re: order by <something wierd>