That does help, but we have a MS SQL database. Do you know howto translate the "connect by prior" to MS SQL?
From: eLink Discussion:Open Text Live Reports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: Tuesday, October 06, 2009 9:10 AMTo: eLink RecipientSubject: RE Nested Groups Structure List
RE Nested Groups Structure List
Posted by bsingh (Singh, Bhupinder) on 2009/10/06 09:10
In reply to: Nested Groups Structure List
Posted by nbride (Bride, Nicole) on 2009/10/06 08:31
Message from Bhupinder Singh <bsingh@opentext.com> via eLink
I find this one works well for listing subgroups with indents, though I don't recall who wrote it. It is Oracle-specific, since it uses the "connect by prior" statement:
select lpad('_____', 2 * (a.l - 1)) || kuaf.name || lpad('*', kuaf.type), kuaf.id from kuaf, ( select childid, level l from kuafchildren start with id in (select kuaf.id from kuaf where lower(name) = 'yourparentgroup') connect by ID = PRIOR ChildID ) a where kuaf.id = a.childid and kuaf.type = 1
You would replace 'yourparentgroup' in the above query with the group you are interested in. Ensure you type the parent group name in lowercase in the query when replacing "yourparentgroup").
Let me know if that helps....
- Bhupinder ---------------------------------------------- Bhupinder Singh, B.Math, B.Ed. Senior Systems Analyst, Information Technology Open Text, Waterloo, Ontario, Canada ----------------------------------------------
From: eLink Discussion: Open Text Live Reports Discussion [mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: Tuesday, October 06, 2009 8:33 AMTo: eLink RecipientSubject: Nested Groups Structure List
Nested Groups Structure List
In reply to: Group Structure LiveReport
Posted by genduser6 (IT, General Dynamics) on 2004/03/30 10:20
Has anyone figured out how to write a LiveReport or SQL query to list all of the groups, indented, showing the list of all of the subgroups?
[To reply to this thread, use your normal E-mail reply function.]
Topic:
Group Structure LiveReport
Discussion:
Open Text Live Reports Discussion
Livelink Server:
knowledge-wlweb01
To Unsubscribe from this Discussion, send an e-mail to unsubscribe.livereportsdiscussion@elinkkc.opentext.com.
- Bhupinder----------------------------------------------Bhupinder Singh, B.Math, B.Ed.Senior Systems Analyst, Information TechnologyOpen Text, Waterloo, Ontario, Canada----------------------------------------------
Hi Lindsay,
We are running SQL 2005. I will do some research on CTE.
Thank you!
Nicole
From: eLink Discussion:Open Text Live Reports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: Tuesday, October 06, 2009 10:19 AMTo: eLink RecipientSubject: RE RE RE Nested Groups Structure List
RE RE RE Nested Groups Structure List
Posted by ldavies (Davies, Lindsay) on 2009/10/06 10:18
In reply to: RE RE Nested Groups Structure List
Posted by nbride (Bride, Nicole) on 2009/10/06 09:57
Message from Lindsay Davies <ldavies@opentext.com> via eLink
Hi Nicole,
That depends on which version of MS SQL server you are running.
SQL 2005 and above supports a technique called recursive common table expressions (CTE).
In earlier versions, you have to write a stored procedure which builds a temporary table of your hierarchy of DTree objects of Group structures.
You then call that stored procedure within your livereport statement to get the list of IDs passed in.
There are examples in this discussion forum, I think.
Regards
Lindsay
From: eLink Discussion: Open Text Live Reports Discussion [mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: 06 October 2009 14:57To: eLink RecipientSubject: RE RE Nested Groups Structure List
RE RE Nested Groups Structure List
In reply to: RE Nested Groups Structure List
Message from Bride, Nicole <nbride@cvps.com> via eLink
That does help, but we have a MS SQL database. Do you know how to translate the "connect by prior" to MS SQL?
From: eLink Discussion: Open Text Live Reports Discussion [mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: Tuesday, October 06, 2009 9:10 AMTo: eLink RecipientSubject: RE Nested Groups Structure List