I wahnt to use this query to create a view
select
SPBPERS_PIDM,
decode(SPBPERS_ETHN_CDE,'2','H'),
decode(SPBPERS_CITZ_CODE,'N','I'),
GORPRAC_RACE_CDE,
substr(GORRACE_DESC,1,1),
(case GORPRAC_RACE_CDE
when '2' then 'N'
when '3' then 'A'
when '4' then 'B'
when '5' then 'P'
when '6' then 'W'
else
null
end)
from
GORPRAC,
gorrace,
spbpers
where
GORPRAC_RACE_CDE = GORRACE_RACE_CDE
and spbpers_pidm = GORPRAC_pidm
I would like to know if it is posible to concatenate all these values
(case GORPRAC_RACE_CDE
when '2' then 'N'
when '3' then 'A'
when '4' then 'B'
when '5' then 'P'
when '6' then 'W'
so I can store in one column
The view I created display the data like this
SZNOLRAC_PIDM SZNOLRAC_RACE_CDE SZNOLRAC_DESC SZNOLRAC_CODE
134524 2 A N
134524 3 A A
134524 4 B B
134524 5 N P
134524 6 W W
I would like something like like thiso in one column
2AN3AA4BB5NP6WW