Coalesce 2 Arrays

From: Alex Magnum <magnum11200(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Coalesce 2 Arrays
Date: 2019-06-24 20:31:40
Message-ID: CA+cR4zeFoa6GS8t6nYPfqFSDc=O3s7Ep5kENOk4c+-dyLKqjFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I have two arrays which I need to combine based on the individual values;
i could do a coalesce for each field but was wondering if there is an
easier way

array_a{a, null,c, d,null,f,null} primary
array_b{null,2 ,null,4,5 ,6,null} secondary

result {a, 2, c, d,5, f,null)

Any advice would be appreciated

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2019-06-24 21:33:24 Re: Coalesce 2 Arrays
Previous Message Kevin Brannen 2019-06-24 17:27:48 RE: [EXT EMAIL] Re: First Time Starting Up PostgreSQL and Having Problems