Sort question - Fractions, Metric etc

From: Bret Stern <bret_stern(at)machinemanagement(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Sort question - Fractions, Metric etc
Date: 2021-08-14 16:14:52
Message-ID: 57f60e61-114f-c403-b2e2-820e76f08d64@machinemanagement.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with metric, imperial, fraction columns.

Is there a way to sort correctly using imperial (eg; .125, .375, .437 ->
1., 1.125)

Couldn't handle it with ORDER BY ASC, DESC args so I added a sort_column
and sorted based

on those values eg; 1,2,3,4,5,6 indicating the value I need to show in
which sequence.

Just curious what the pro's do

Bret

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-08-14 16:21:21 Re: Sort question - Fractions, Metric etc
Previous Message Brent Wood 2021-08-14 03:27:43 RE: Multi-master replication