It is a common need to print folder paths of sysobjects (documents are also sysobjects) as a part of DQL query results. The
ROW_BASED hint makes it convenient to do so as shown in the query below.
SELECT s.object_name, f.r_folder_path
FROM dm_sysobject s, dm_folder f
WHERE s.i_folder_id = f.r_object_id
AND f.r_folder_path != ' '
AND additional conditions
Note that you can replace
dm_sysobject with another custom type, which is a descendant (direct or indirect subtype) of
dm_sysobject. Don’t forget to add conditions for the where clause lest you should retrieve a large number of objects (unless that’s what you need).