Hello,
I am trying to write a LiveReport to show the output as follows:
Document Name Folder path
Test1.doc Enterprise\Folder1\Folder2
I can get the data out with the following query, but I am struggling to put the output in one line. We are on SQL Server 2005 and my query looks like
WITH n(parentid, dataid, subtype, name, FolderLevel) AS
(SELECT parentid, dataid, subtype, name, 0 AS FolderLevel
FROM proedmsusr.dtree
WHERE dataid = 1498816
UNION ALL
SELECT nplus1.parentid, nplus1.dataid, nplus1.subtype, nplus1.name, FolderLevel + 1
FROM proedmsusr.dtree as nplus1, n
WHERE n.parentid = nplus1.dataid
)
SELECT n.FolderLevel, n.name, n.subtype 'Object Type'
FROM n
Any help would be greatly appreciated.
Thanks
Abu