select to_char(replace(wm_concat(name), ',', '')) from codeitems where setid = 'A018' and '110101' like code || '%' GO select listagg(name,'') within group(order by code) from codeitems where setid = 'A018' and '110101' like code || '%'