Re: sort output per alpha-numeric?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 1, 2021 at 3:50 PM David G. Johnston <david.g.johnston@xxxxxxxxx> wrote:
On Wed, Dec 1, 2021 at 3:38 PM Sbob <sbob@xxxxxxxxxxxxxxxxxxxxx> wrote:

I get a list like this:

print_size  
------------
11x14

If this isn't sufficient (e.g., if the second dimension causes the issue) you may need to break the two-part string into two separate fields, convert them to integers, and then sort on the pair.


Just for some perspective - the normalized version of this model would store the width and height measurements separately and your print_size text would be a presentation issue.  Though the use of a lookup table may ease the usage of this somewhat.

Another possibility, one that I tend to avoid, would be to use an "enum" type here - which has the property that the elements of the enum have an order that is independent of the display value.

In short though, print_size as you've defined it is a composite value which should be broken down into its components during the process of normalization.

David J.


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux