Monday, October 26, 2015

Using CONNECT BY in PSQuery

 
 
 
 
1.     In Application Designer, create a SQL object with following SQL. Let us name it as TEST_SQL
a.POSITION_NBR<>' '
   AND a.REPORTS_TO<>' '
   AND LEVEL>1) CONNECT BY nocycle PRIOR a.POSITION_NBR=a.REPORTS_TO start WITH (a.EMPLID
 
2.     Add a record in Query

 
3.     Add an Expression




 

 
4.     Add a prompt to the Query

 
5.     Add the Expression as the Criteria to the Query


 
6.     Ultimately the Query would look like