
select 0 as act_seq,<param.showAllJobs> as TSK_DESC,<param.showAllJobs> as job_selector, <param.showAllJobs> as TSK_CODE from dual
union all
select act_seq,TSK_DESC,act_seq|| '-' ||TSK_DESC as job_selector,TSK_CODE
from r5activities, r5tasks where act_event=<param.jobnum>
and COALESCE(act_parent,act_act)=<param.activity>
AND COALESCE(act_defermaintenance,'-') = '-'
and act_task=tsk_code and act_taskrev=tsk_revision and
tsk_activechecklist='+'  and act_act <0 and exists (select 1 from r5actchecklists
where ack_event= act_event and ack_act=act_act)
