1 Reply Latest reply on May 7, 2015 7:02 AM by Marwim

    Suppress or Display field values

    user2407738

      I have the following statement:

      Select decode ( lag( a.application_Id) over

         (order by a.application_Id), a.application_Id,null, a.application_Id) as

          application_Id,

        

        decode ( lag( R.FIRST_NAME) over

         (order by R.FIRST_NAME), R.FIRST_NAME,null, R.FIRST_NAME) as

         FIRST_NAME,

        decode ( lag( R.LAST_NAME) over

         (order by R.LAST_NAME), R.LAST_NAME,null, R.LAST_NAME) as

         LAST_NAME,

         ARR.REVIEWER_COMMENTS,

        ARR.REVIEW_SUBMITTED_DATE,

        rq.question, arf.Answer

      FROM applications a

           Inner Join .APP_REVIEW_REQUESTS arr

            a.application_ID = ARR.APPLICATION_ID

           Inner Join REVIEWERS R

            On arr.Reviewer_id = R.Reviewer_Id

           Left Outer Join REVIEWERS_PROCESS rproc

            On A.APPLICATION_ID = rproc.Application_ID

           Left Outer Join APP_REVIEWER_FEEDBACK ARF

            On A.APPLICATION_ID = ARF.Application_Id

           Inner Join REVIEWERS_QUESTIONS RQ

            On RQ.QUESTION_ID = ARF.QUESTION_ID

      WHERE A.APPLICATION_ID in (505,506,507,508)

      Order By a.application_Id

      ;

      The first decode works, the others not.  Does anyone have an idea here? Thanks, Tony

      P.S. A screenshot of little bit of output: