Record structure to Omnis list structure

Doug Easterbrook doug at artsman.com
Thu Apr 1 20:15:14 UTC 2021


hi xavier.

this might help you.  it seems to describe your situation almost exactly.

https://stackoverflow.com/questions/41652740/convert-rows-to-column-in-postgresql




Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On April 1, 2021, at 11:43 AM, IT <it at plastipol.com> wrote:
> 
> Hi,
> 
> 
> I have a select from postgres database that returns records with item properties. Every record is a single propertie.
> 
> Something like this:
> 
> item_sku   car_name   laca_value   unca_simbol
> 36102        Lenght         490             mm
> 36102        Width          300             mm
> 36102        Height         200             mm
> 36102        Weight         1,1             kg
> 36102        Colour         Red            NULL
> 36103        Lenght         500             mm
> 36103        Width          300             mm
> 36103        Height         225             mm
> 36103        Weight         2,0             kg
> 36103        Colour        Blue            NULL
> 36104        Lenght         600             mm
> 36104        Width          350             mm
> 36104        Height         225             mm
> 36104        Weight         2,5             kg
> 36102        Colour        Grey            NULL
> 
> 
> I need to convert records structure in a table.
> Extract title columns, and item values to an omnis list 
> 
> I need an Omnis list with something like this.
> 
> SKU     Length(mm)     Width(mm)     Height(mm)     Weight(kg)     Colour
> 36102   490            300           200            1,1             Red
> 36103   500            300           225            2,0             Blue
> 36104   600            350           225            2,5             Grey
> 
> The number of properties varies based on product lines. 
> 
> 
> Any advice ?
> 
> regards
> 
> xavier
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list