1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
select
req.request_id DFS_LINK,
reqP.status_name STATUS,
req.request_id DFS_,
req.description ID,
reqD.visible_parameter2 PACK,
reqH.visible_parameter3 INIT_FORECAST_DELIV,
reqH.visible_parameter4 CUR_FORECAST_DELIV,
reqH.visible_parameter1 CONTENT_EDITOR,
reqH.visible_parameter9 CONTENT_RECEIVER,
reqD.visible_parameter4 STREAM,
req.last_update_date LAST_UPDATED,
reqH.visible_parameter33 MEETING_DATE,
reqH.visible_parameter21 DELIVERY_DATE,
reqH.visible_parameter22 APPROVAL_DATE,
reqH.visible_parameter26 INIT_FOREC_DELIV_D,
ST1.creation_date AS DELI_TRANSAC_DATE,
ST1.last_update_date AS DELI_LAST_UPDATE_TRANSAC,
ST2.creation_date AS APPR_TRANSAC_DATE,
ST2.last_update_date AS APPR_LAST_UPDATE_TRANSAC,
ST1.visible_result_value STEP_RESULT_VALUE,
ST2.visible_result_value STEP_RESULT_VALUE,
from kcrt_requests req, kcrt_req_header_details reqH, kcrt_request_details reqD, kwfl_workflows w,
kcrt_portlet_request_list_v reqP
Left join
kwfl_step_transactions ST1
on req.workflow_id = w.workflow_id
and w.workflow_id = ST1.workflow_id
and ST1.status = 'COMPLETE'
and ST1.visible_result_value = 'Deliver document'
Left join
kwfl_step_transactions ST2
on req.workflow_id = w.workflow_id
and w.workflow_id = ST2.workflow_id
and ST2.status = 'COMPLETE'
and ST2.visible_result_value IN ('Approve document','Approve updated document')
where
req.request_id = reqH.request_idand req.request_id = reqP.request_idand req.request_id = reqD.request_id
and reqP.request_type_name='NC - DFS' |
Partager