hi

in the query below, how can I make it return no rows instead if the 'OK' value?' basically I only want to return the row in a case-when/then statement where the 'when' part of the query is returned, otherwise I don't want to return any value.

Below is my query.

Code:
select case 
(select count(group_name) from group_user where user_network_name=UPPER('userName') and group_name in (select gruppe from GruppeKonto))
when 0 then 'OK'
else
  case
    (select INSTR(listagg(akseptertekonto, ',') WITHIN GROUP (ORDER BY akseptertekonto), '1017', 1, 1) as akseptert_kontoliste from gruppeKonto where gruppe in 
    (select group_name from group_user where user_network_name=UPPER('userName') and group_name in (select gruppe from GruppeKonto)))
  when 0
    then 'X'
  else
    'OK'
  end
end from dual
Hope anyone can help.

Thanks