I have a query:
select b.operator_id, a.trade_code
from rhm_operator_trades a, rhm_operators b
where b.operator_id = a.operator_id
and b.operator_id = '90177'
which returns:
90177 38
90177 45
90177 50
Is it possible to get the following output from an SQL query
90177 38,45,50
i.e. all the trade codes are concatenated onto one row, against the corresponding operator id record.
I can produce this result in a PL/SQL loop, but I really need to get this output from a single SQL query and I can for the life of me see how it could be done.
So any help would be appreciated.