Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi Friends,
I am working on SQL functionality where I need to get the folder detail includes name of product/library, name of folder and location of folder, I am able to fetch product and folder name detail but I am not able to find the location of folder can anyone please help me how I can get folder location using sql query
A D wrote:
Hi Friends,
I am working on SQL functionality where I need to get the folder detail includes name of product/library, name of folder and location of folder, I am able to fetch product and folder name detail but I am not able to find the location of folder can anyone please help me how I can get folder location using sql query
From the subfolder table the ida3b2folderinginfo column contains the (subfolder.)ida2a2 of the parent folder. Keep looking "up" until the ida3b2folderinginfo column is 0 (or the classnamekeyb2folderinginfo column is null) and at this point you have found the root folder.
RandyJones wrote:
A D wrote:
Hi Friends,
I am working on SQL functionality where I need to get the folder detail includes name of product/library, name of folder and location of folder, I am able to fetch product and folder name detail but I am not able to find the location of folder can anyone please help me how I can get folder location using sql query
From the subfolder table the ida3b2folderinginfo column contains the (subfolder.)ida2a2 of the parent folder. Keep looking "up" until the ida3b2folderinginfo column is 0 (or the classnamekeyb2folderinginfo column is null) and at this point you have found the root folder.
And here is an Oracle query that will look "up" and find the parents of a subfolder:
select
name,
ida2a2,
nameb2folderinginfo,
ida3b2folderinginfo
from subfolder
connect by prior ida3b2folderinginfo = ida2a2
start with name='<Name of Folder goes here>'
order by ida2a2;
And here is an Oracle query that will look "down" and find the children of a subfolder:
select
name,
ida2a2,
nameb2folderinginfo,
ida3b2folderinginfo
from subfolder
connect by prior ida2a2 = ida3b2folderinginfo
start with name='<Name of Folder goes here>'
order by ida2a2;