Quantcast
Channel: SCN : Unanswered Discussions - Semantic Layer
Viewing all articles
Browse latest Browse all 1291

Recursive sql at the universe designer level

$
0
0

Hi,

 

Is there any way to write recursive sql at the derived table level in the universe?

 

If i use below with clause query it is throwing error

 

WITH Asd(Child,
  Parent
  
)
AS(SELECT Employee_Id,
  Manager_Id
  
FROM Employees
  
UNIONALL
  
SELECT E.Employee_Id,
  A
.Parent
  
FROM Employees E, Asd A
  
WHERE E.Manager_Id = A.Child
  
)
SELECT Child,
  Parent
 
FROM Asd
 
WHERE Parent ISNOTNULL
 
ORDERBY Child, Parent;


if i use below query then am getting two level data (parent and child but not grand parents and all)

Select empno,ename,mgr

   from emp

   start with mgr is null

   connect by prior empno = mgr;



Is there any way to get n levels of data using connect by prior clause? Please help me


Viewing all articles
Browse latest Browse all 1291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>