SQL query similar to Object search panel.

Discussion created by PatrickHiggins607207 on Jul 9, 2015
Latest reply on Jul 29, 2015 by PatrickHiggins607207
Looking for a SQL script that will generate a report similar to the object name, type, path-location listing that is returned by the search function.   I have a good start with the 'Statistics of a job within a folder' from the automicblog  site, but I want to have the location of the objects shown like the 'In Folder' column in the Object search panel. 

I have modified the above report to use oh_lastdate (rather than ah_timestamp1) and that makes the selection of objects matches the GUI search.  But would like to have the Folder path included.

Also when I make the selection criteria higher (oh_name like '%\UC4_OBJECTS'  ) I sometimes get errors on 'multiple values returned where single value expected'

ANy ideas