AnsweredAssumed Answered

Query runs in Toad, but gives Column Ambiguously Defined when attached to Portlet

Question asked by Lowell on Aug 26, 2014
Latest reply on Sep 12, 2014 by Lowell

Hi,

I have a query that I can run in Toad, converted to NSQL.  The query saves properly, but when I attempt to open the Portlet the query feeds... I get the following error.  I'm not sure what I'm missing.  Any thoughts?

Using input:
{nsql.execFlag=1}

at com.niku.union.persistence.PersistenceController.createException(PersistenceController.java:2048)
at com.niku.union.persistence.PersistenceController.handleSQLException(PersistenceController.java:2152)
at com.niku.union.persistence.PersistenceController.processSql(PersistenceController.java:2779)
at com.niku.union.persistence.PersistenceController.processStatement(PersistenceController.java:868)
at com.niku.union.persistence.PersistenceController.processStatements(PersistenceController.java:768)
at com.niku.union.persistence.PersistenceController.doProcessRequest(PersistenceController.java:576)
at com.niku.union.persistence.PersistenceController.processRequest(PersistenceController.java:306)
at com.niku.union.persistence.nsql.NSQLQuery._execute(NSQLQuery.java:599)
... 45 more
Caused by: java.sql.SQLException: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00918: column ambiguously defined

at com.ca.clarity.jdbc.oraclebase.ddcg.b(Unknown Source)
at com.ca.clarity.jdbc.oraclebase.ddcg.a(Unknown Source)
at com.ca.clarity.jdbc.oraclebase.ddcf.b(Unknown Source)
at com.ca.clarity.jdbc.oraclebase.ddcf.a(Unknown Source)
at com.ca.clarity.jdbc.oracle.ddn.s(Unknown Source)
at com.ca.clarity.jdbc.oraclebase.ddes.v(Unknown Source)
at com.ca.clarity.jdbc.oraclebase.ddes.r(Unknown Source)
at com.ca.clarity.jdbc.oraclebase.dddm.execute(Unknown Source)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68)
at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$b6963e8c.execute(<generated>)
at com.niku.union.persistence.jdbc.SQLTracePreparedStatement.execute(SQLTracePreparedStatement.java:109)
at com.niku.union.persistence.PersistenceController.processSql(PersistenceController.java:2741)
... 50 more

 

SELECT
@SELECT:DIM:USER_DEF:IMPLIED:RELEASESTAT:OCR.ID:RELEASE_ID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:I.ID:PROJECT_PKID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:I.CODE:PROJECT_ID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:I.NAME:PROJECT_NAME@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:MGR.EXTERNAL_ID:PROJ_MGR_ID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:MGR.FIRST_NAME || ' ' || MGR.LAST_NAME:PROJ_MGR_NAME@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:MGR.EMAIL_ADDRESS:PROJ_MGR_EMAIL@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:OCR.TRG_REL_NAME:RELEASE_NAME@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'ALL_FEAT_COMP' AND T.PRSTATUS = 2 ))):ALL_FEAT_COMP_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'AR' AND T.PRSTATUS = 2 ))):ADOPTION_RPT_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'BR' AND T.PRSTATUS = 2 ))):BENEFIT_REALIZ_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'DEF_ACC' AND T.PRSTATUS = 2 ))):DEFECT_RES_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'DEF_COMP' AND T.PRSTATUS = 2 ))):DEF_COMP_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'DR' AND T.PRSTATUS = 2 ))):DEP_READY_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'GA' AND T.PRSTATUS = 2 ))):GENERAL_AVAIL_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'INT_ROAD_MAP' AND T.PRSTATUS = 2 ))):INIT_RDMP_COMP_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'OR' AND T.PRSTATUS = 2 ))):OPER_READY_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'PMLC_def_fnd_cmp' AND T.PRSTATUS = 2 ))):PMLC_DEF_FND_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'PMLC_exe_cmp' AND T.PRSTATUS = 2 ))):PMLC_EXE_CMP_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'PMLC_prj_cls_cmp' AND T.PRSTATUS = 2 ))):PMLC_PRJ_CLS_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'POR_COMM' AND T.PRSTATUS = 2 ))):COM_TO_POR_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'RECOM_POR' AND T.PRSTATUS = 2 ))):RECOM_TO_POR_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'TEST_COMP' AND T.PRSTATUS = 2 ))):INIT_TEST_COMP_ACTDT@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:(z_list_join(CURSOR(SELECT T.PRFINISH FROM
ODF_CA_TASK OCT
INNER JOIN PRTASK T ON OCT.ID = T.PRID
WHERE OCT.TRG_REL_STAT = OCR.ID
AND OCT.TRG_POR_MILESTONE = 'z_tst' AND T.PRSTATUS = 2 ))):ZTEST_ACTDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'ALL_FEAT_COMP'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'ALL_FEAT_COMP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'ALL_FEAT_COMP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:ALL_FEAT_COMP_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'AR'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'AR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'AR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:ADOPTION_RPT_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'BR'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'BR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'BR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:BENEFIT_REALIZ_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'DEF_ACC'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'DEF_ACC'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'DEF_ACC'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:DEFECT_RES_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'DEF_COMP'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'DEF_COMP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'DEF_COMP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:DEF_COMP_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'DR'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'DR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'DR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:DEP_READY_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'GA'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'GA'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'GA'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:GENERAL_AVAIL_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'INT_ROAD_MAP'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'INT_ROAD_MAP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'INT_ROAD_MAP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:INIT_RDMP_COMP_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'OR'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'OR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'OR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:OPER_READY_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'PMLC_def_fnd_cmp'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_def_fnd_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_def_fnd_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:PMLC_DEF_FND_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'PMLC_exe_cmp'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_exe_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_exe_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:PMLC_EXE_CMP_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'PMLC_prj_cls_cmp'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_prj_cls_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_prj_cls_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:PMLC_PRJ_CLS_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'PMLC_prj_cls_cmp'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_prj_cls_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'PMLC_prj_cls_cmp'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

PMLC_PRJ_CLS_PLNDT,

z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'POR_COMM'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'POR_COMM'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'POR_COMM'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:COM_TO_POR_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'RECOM_POR'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'RECOM_POR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'RECOM_POR'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:RECOM_TO_POR_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'TEST_COMP'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'TEST_COMP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'TEST_COMP'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:INIT_TEST_COMP_PLNDT@,

@SELECT:DIM_PROP:USER_DEF:IMPLIED:RELEASESTAT:z_list_join(CURSOR(SELECT DISTINCT
'P-' || translate(TO_CHAR(PBD1.FINISH_DATE,'MM/DD/YYYY'),',',' ') || ', '

FROM INV_INVESTMENTS I1
INNER JOIN PRTASK T1 ON I1.ID = T1.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT1 ON T1.PRID = OCT1.ID
INNER JOIN PRJ_BASELINES PB1 ON I1.ID = PB1.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD1 ON PB1.ID = PBD1.BASELINE_ID
AND T1.PRID = PBD1.OBJECT_ID
AND PBD1.OBJECT_TYPE = 'TASK'

WHERE OCT1.TRG_POR_MILESTONE = 'z_tst'
AND T1.PRISMILESTONE = 1
AND PB1.IS_CURRENT = 0
AND ((PBD1.FINISH_DATE) != (SELECT (PBD2.FINISH_DATE)

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'z_tst'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID))
AND OCT1.TRG_REL_STAT = OCR.ID))

||

(SELECT TO_CHAR(PBD2.FINISH_DATE,'MM/DD/YYYY')

FROM INV_INVESTMENTS I2
INNER JOIN PRTASK T2 ON I2.ID = T2.PRPROJECTID
INNER JOIN ODF_CA_TASK OCT2 ON T2.PRID = OCT2.ID
INNER JOIN PRJ_BASELINES PB2 ON I2.ID = PB2.PROJECT_ID
INNER JOIN PRJ_BASELINE_DETAILS PBD2 ON PB2.ID = PBD2.BASELINE_ID
AND T2.PRID = PBD2.OBJECT_ID
AND PBD2.OBJECT_TYPE = 'TASK'

WHERE OCT2.TRG_POR_MILESTONE = 'z_tst'
AND T2.PRISMILESTONE = 1
AND PB2.IS_CURRENT = 1
AND OCT2.TRG_REL_STAT = OCR.ID)

:ZTEST_PLNDT@

FROM INV_INVESTMENTS I
INNER JOIN ODF_CA_TRG_RELEASE_OBJ OCR ON I.ID = OCR.ODF_PARENT_ID
LEFT OUTER JOIN CMN_SEC_USERS MGR ON I.MANAGER_ID = MGR.ID

WHERE @FILTER@
AND (@where:param:user_def:integer:manager_id@ is null     
or @where:param:user_def:integer:manager_id@ = I.MANAGER_ID)

Outcomes