A while ago, I found a livereports discussion in the knowledge center with an Oracle DB report showing how to trace what groups/projects a user belongs to in Livelink. Since this was a hierarchical query, I converted it to MSSQL using a UDF. My report does not return all groups and projects for the user. I am not able to figure out what I am doing wrong. Can anyone take a look at the attached reports and help?The link to the original report (Oracle) is below:
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objId=2627549&objAction=view&show=0My Livereport is as attached. My UDF is as below:CREATE function dbo.ufn_getChildUsers(
@userID int)returns
@t table(userID int, lvl int)asbegindeclare
@lvl intset
@lvl=1insert @t values(
@rowcount > 0begin insert
@t select distinct a.ID,
@lvl+1 from livelink900.KUAFChildren a inner join
@t b on a.ChildID = b.UserID and b.lvl =
@lvl set
@lvl =
@lvl + 1endreturnend