That being said, I probably need to look into arrays more. I haven't used them at all in my relatively brief experience with postgres. More research!
2009/11/20 Віталій Тимчишин <tivv00@xxxxxxxxx>
How aboutselect * from (
CREATE OR REPLACE VIEW value_codes_view AS(ARRAY[val_1_cd_1, ... , val_2_cd_12])[i] as value_code,
SELECT value_codes.id_nbr,
value_codes.id_qfr,
(ARRAY[val_1_amt_1, ... , val_2_amt_12])[i] as value_amount,
FROM value_codes, generate_series(1,24) i) a
where value_code is not null and value_code != '';
?