SELECT pfv.base_flow_name Base_flow_name
,
pfi.instance_name,
(SELECT To_char(Min(fti1.creation_date),'DD-MON-YYYY')
FROM pay_flow_task_instances fti1
WHERE pfi.root_flow_instance_id=fti1.flow_instance_id)
FIRST_SCHEDULE_DATE,
To_char(fti.scheduled_date,'DD-MON-YYYY')
Current_Schedule_Date,
fti.status
CURRENT_SCHEDULE_STATUS,
(SELECT Listagg(fp.parameter_name
|| '='
|| pv.flow_param_value,',')
within GROUP(ORDER BY fp.parameter_name)
FROM pay_flow_parameters_vl fp,
pay_flow_param_values pv
WHERE 1 = 1
AND fp.base_flow_id=pfv.base_flow_id
AND pv.flow_instance_id=pfi.flow_instance_id
AND fp.base_flow_parameter_id=pv.base_flow_parameter_id
AND flow_param_value IS NOT NULL
AND pfi.instance_name=pfi.instance_name)
Flow_parameters_Latest_Run,
fti.created_by
Schedule_Created_By
FROM pay_flow_task_instances fti,
pay_flow_tasks_vl ft,
pay_flow_instances pfi,
pay_flows_vl pfv
WHERE 1 = 1
AND pfv.base_flow_id=pfi.base_flow_id
AND fti.base_flow_task_id=ft.base_flow_task_id
AND pfi.flow_instance_id=fti.flow_instance_id
AND fti.scheduled_date IS NOT NULL
AND fti.status='SCHEDULED'
AND pfi.status='SCHEDULED'
ORDER BY flow_name DESC
,
pfi.instance_name,
(SELECT To_char(Min(fti1.creation_date),'DD-MON-YYYY')
FROM pay_flow_task_instances fti1
WHERE pfi.root_flow_instance_id=fti1.flow_instance_id)
FIRST_SCHEDULE_DATE,
To_char(fti.scheduled_date,'DD-MON-YYYY')
Current_Schedule_Date,
fti.status
CURRENT_SCHEDULE_STATUS,
(SELECT Listagg(fp.parameter_name
|| '='
|| pv.flow_param_value,',')
within GROUP(ORDER BY fp.parameter_name)
FROM pay_flow_parameters_vl fp,
pay_flow_param_values pv
WHERE 1 = 1
AND fp.base_flow_id=pfv.base_flow_id
AND pv.flow_instance_id=pfi.flow_instance_id
AND fp.base_flow_parameter_id=pv.base_flow_parameter_id
AND flow_param_value IS NOT NULL
AND pfi.instance_name=pfi.instance_name)
Flow_parameters_Latest_Run,
fti.created_by
Schedule_Created_By
FROM pay_flow_task_instances fti,
pay_flow_tasks_vl ft,
pay_flow_instances pfi,
pay_flows_vl pfv
WHERE 1 = 1
AND pfv.base_flow_id=pfi.base_flow_id
AND fti.base_flow_task_id=ft.base_flow_task_id
AND pfi.flow_instance_id=fti.flow_instance_id
AND fti.scheduled_date IS NOT NULL
AND fti.status='SCHEDULED'
AND pfi.status='SCHEDULED'
ORDER BY flow_name DESC