> [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 was performance, because I feared that coalesce would evaluate e.g. column c1 50 times. But I did some testing and it seems to scale linear. 100,000 rows with 50 columns take 25 seconds on my test machine. Not exciting but something I can work with. I played already with arrays but what I came up with was slower than the plain coalesce. Klaus |