select distinct bu_code,bu_name from table1
where (
bu_code in
(SELECT regexp_substr ((select bu_group
from table
where username = '${name}'), '[^,]+', 1, rownum)
FROM dual
connect BY rownum <=
length(regexp_replace
((select bu_group
from table
where username = '${name}'), '[^,]', NULL)))
or 1 = 1
and (select count(bu_group) as num
from table
where username = '${name}') = 0
)
order by bu_code