AW: Use left hand column for null values

2018-01-19 Thread kpi6288
> [David G. Johnston] > My $0.02​ > > ​Unless you have some need to generalize I'd say ​just brute-force it and be > done. > > You could maybe play with arrays to get something that looks different but I > don't think it would be much shorter to code or easier to understand. My concern

Re: Use left hand column for null values

2018-01-19 Thread David G. Johnston
On Fri, Jan 19, 2018 at 8:46 AM, wrote: > I’m trying to fill up columns containing NULL with the most recent NOT > NULL value from left to right. > > Example: > > Select 2, 1, null, null, 3 > > Should be converted into > > 2, 1, 1, 1, 3 > > > > The following query works but I wonder if there is a

Use left hand column for null values

2018-01-19 Thread kpi6288
I'm trying to fill up columns containing NULL with the most recent NOT NULL value from left to right. Example: Select 2, 1, null, null, 3 Should be converted into 2, 1, 1, 1, 3 The following query works but I wonder if there is an easier way for tables with 50 or more columns: with