Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Project and Folders inside that (heirarchy)
K_A
How the following SQL works if I select PROJECT and would like to display all the FOLDERS/Sub Folders in that?SELECT DATAID FROM DTREE START WITH DATAID = %1 CONNECT BY PRIOR DATAID = PARENTIDNOTE:- %1 is the dataid of the node
Find more posts tagged with
Comments
Appu_Nair
SELECT DATAID FROM DTREE START WITH DATAID = %1 CONNECT BY PRIOR ABS( DATAID) = ABS(PARENTID)This will walk the negative volumeid's.Extremely slow if your livelink has a lot of items.ABS converts it to absolute so that negative/positive don't make a difference.Try asking somebody to see if dtreeancestors has better luck at traversing this,I do not know how.
K_A
Thanks alot
Martin_Gäckler
Hi,this SQL has the problem, that oracle performs a full table check since the database cannot use the index of dtree. This is a better version whicj allows oracle to use the indes:SELECT DATAID FROM DTREE START WITH DATAID = %1 CONNECT BY PRIOR DATAID = PARENTID or DATAID = -PARENTIDHope this helpsMartin
Martin_Gäckler
Hi, sorry, there is an error. This is the correct SQL:SELECT DATAID FROM DTREE START WITH DATAID = %1 CONNECT BY PRIOR DATAID = PARENTID or PRIOR DATAID = -PARENTIDHope this helps