2 Replies Latest reply: Sep 4, 2013 8:10 AM by xGoody RSS

    view criteria IN statement

    xGoody

      Hello,

       

      I am using the following code:

       

         

      ViewObject vo = ADFUtil.getViewObject(view);
          ViewCriteria vc = vo.createViewCriteria();
          ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
        
          String inClause = "IN ((SELECT EMPLOYEE_ID FROM EMPLOYEE CONNECT BY PRIOR EMPLOYEE_ID = LINE_MANAGER_ID START WITH LINE_MANAGER_ID = '" + authorId + "'))";

       

          vcRow.setAttribute("EmployeeId", inClause);
          vc.addElement(vcRow);
        
          vo.applyViewCriteria(vc);
          System.out.println(vo.getQuery());
          vo.executeQuery();

       

      I am using this view criteria, but i don't know why, it shows just the employee where emplyee_id = authorId.

      Is the logic correct?

       

      Thanks in advance.