avatar image
Former Member

How to get the phase with latest time

Hi Experts,

We have write a custom Query to get the document phase start time from the workflow table, the query brings all the phases that equal the current phase. e.g, If a document has been to phase "CONTRACT APPROVAL" twice, the query will bring back two rows, whilst we only need the latest one.

SELECT B.PHASE A.START_DATETIME AS START_DATE,

FROM

<%SCHEMA%> .FCI_CONGEN_CONTRACT_DOC B

LEFT OUTER JOIN FCI_DOC_WORKFLOW_HISTORY A

WHERE

AND B.CURR_CONFIG_PHASE_OBJECT_ID = A.PHASE_REF_OBJECT_ID

Many Thanks

Gino

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content