select
uco_code as code,uco_desc as description
FROM  r5ucodes
WHERE uco_rentity = 'CFOP'
AND COALESCE(uco_notused,'-') = '-'
AND EXISTS( SELECT 1 FROM r5taskchecklists
WHERE tch_task = <parameter.task>
AND tch_taskrev = <parameter.taskrev>
AND tch_condition_options IS NOT NULL
AND INSTR(',' || tch_condition_options || ',',',' || uco_code || ',' ) > 0
)
