Re: Sort question - Fractions, Metric etc

Поиск
Список
Период
Сортировка
От Bret Stern
Тема Re: Sort question - Fractions, Metric etc
Дата
Msg-id 40fa1830-71d0-c908-ba5e-5c72cfbe9368@machinemanagement.com
обсуждение исходный текст
Ответ на Re: Sort question - Fractions, Metric etc  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Sort question - Fractions, Metric etc  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Strings;

I haven't explored doing this with numeric types, but some columns 
needed alpha chars eg 13mm.

Although I could have front ended this UI with mm nomenclature I did not.

I'll put a table together with appropriate numeric types and see if the 
sort will behave.



On 8/14/2021 9:21 AM, Adrian Klaver wrote:
> On 8/14/21 9:14 AM, Bret Stern wrote:
>> 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)
>
> Alright how is this different from metric or fraction?
>
> I can sort of see fraction if you mean as 1/3, 1/20, etc.
>
> What is the data type of the field you are storing this in?
>
>>
>> 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
>>
>>
>>
>
>



В списке pgsql-general по дате отправления:

Предыдущее
От: Shrikant Bhende
Дата:
Сообщение: Join for the parent table will not leverage the index scan
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Sort question - Fractions, Metric etc