select
uco_code,uco_desc
FROM  r5ucodes
WHERE uco_rentity = 'CFOP'
AND COALESCE(uco_notused,'-') = '-'
AND EXISTS( SELECT 1 FROM r5actchecklists
WHERE ack_event = <param.workorder>
AND ack_act = <param.activity>
AND ACK_POSSIBLE_CONDS_AS_FOUND IS NOT NULL
AND instr(',' || ACK_POSSIBLE_CONDS_AS_FOUND || ',' , ',' || uco_code || ',' ) > 0
)

