3 Replies Latest reply on Feb 6, 2019 5:20 PM by Ravi Teja

    SQL PathID Table to match DocumentID

    james demarco

      Can anyone tell me which table in SQL you can use to match the path with the document?

      I have a filename that is not appearing in search but is showing as being in a wait state by a deleted user - I am trying to track down where it is (I assume the file is deleted) - just looing for a simple table where I can match PathID with DocumentID.

      Thanks

        • Re: SQL PathID Table to match DocumentID
          Joy Garon

          Assuming you want the folder path... You need to join documents to documentsinprojects to projects

          • Re: SQL PathID Table to match DocumentID
            Ravi Teja

            Hi ,

             

            This should give you Name , Path and Status.

             

            SELECT        Documents.Filename, Projects.Path, Status.Name AS State
            FROM            Documents INNER JOIN
                                     DocumentsInProjects ON Documents.DocumentID = DocumentsInProjects.DocumentID INNER JOIN
                                     Projects ON DocumentsInProjects.ProjectID = Projects.ProjectID INNER JOIN
                                     Status ON Documents.CurrentStatusID = Status.StatusID
            where 
            Projects.Path like '%Location%' and 
            Documents.Filename like '%.slddrw'
            
            
            

             

            Regards

            Ravi T