AnsweredAssumed Answered

Get full path of directories in EPDM using SQL

Question asked by Guy Edkins on Oct 29, 2019
Latest reply on Oct 31, 2019 by Guy Edkins

I am looking to capture to an EPDM list (for cards) all the subdirectories under a particular directory using SQL. Currently I have this call which gives me all the directory names. 

SELECT Projects.Name FROM Projects INNER JOIN ProjectTreeRec ON Projects.ProjectID = ProjectTreeRec.ChildProjectID WHERE (ProjectTreeRec.ParentProjectID =1841) and Projects.Name <> 'CATALOG PART MODELS' and Projects.Name <> 'ENGINEERING SPECIFICATIONS' ORDER BY Projects.Name Asc

It returns the following:

Name:

PPG Industries

Purchasing Specifications

Pyramid

What I need returned is this type of listing for all the subdirectories:

ENGINEERING SPECIFICATIONS/CATALOG PART MODELS/Pyramid

 

I am not quite sure how to do get this in SQL. I have thought about the Concat function with a subquery, but I suspect there is a cleaner way to do it. 

 

TIA.

Outcomes