Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
User's Department
Satbinder_Shergill_(eu0014125_-_(deleted))
Hi AllIn Sql how do I get the Department a user belongs toI know that the department is a group and can list all groups for a user. But how do I know which one is the departmentMany ThanksSat Shergill
Find more posts tagged with
Comments
Lindsay_Davies
Message from Lindsay Davies via eLinkHi Sat,Try this....select k1.id,k1.name,k1.groupid,k2.name "GroupName" from kuaf k1, kuafk2 where k1.id=1000 and k1.groupid = k2.idSQL> / ID NAME GROUPID GroupName---------- ------------- ---------- ------------------------------------ 1000 Admin 1001 DefaultGroup RegardsLindsayUK-Support-----Original Message-----From: eLink Discussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: 23 February 2005 14:24To: eLink RecipientSubject: User's DepartmentUser's DepartmentPosted by EU0014125 on 02/23/2005 09:21 AMHi AllIn Sql how do I get the Department a user belongs toI know that the department is a group and can list all groups for auser. But how do I know which one is the departmentMany ThanksSat Shergill[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Livelink LiveReports Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2249677&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Steve_McDonough
Hello Sat,Here's a SQL select that I use to list the user and their primary department (group). I hope that it resolves your question. An importable LiveReport.rpt file is also attached.Regards,LeonSELECT K1.ID "User ID", K1.NAME "Login", K1.LASTNAME +', '+ K1.FIRSTNAME "User Name", K1.GROUPID "Dept ID", K2.NAME "Dept Name", K1.MAILADDRESS "e-mail Address" FROM KUAF K1, KUAF K2 WHERE K2.ID = K1.GROUPID AND K1.DELETED = 0 ORDER BY "User Name"
Steve_McDonough
Sorry, I forgot to attach the LiveReport. Here it is.Leon