Christian_Boeck_57

Alle Objekte eines Folders auslesen mittels SQL Statement

Discussion created by Christian_Boeck_57 on Feb 22, 2017
Latest reply on Mar 20, 2017 by Wolfgang_Brueckler_1288
Abfrage für MSSQL
Mandant = 1, Folder = 'Playground'

WITH FolderHierarchy ( NAME, OTYPE, IDNR ) AS (
     SELECT OH_NAME, OH_OTYPE, OH_IDNR from OH
     where OH_Client = 1 and OH_Name like '%\PLAYGROUND'
     UNION ALL
     SELECT OH_NAME, OH_OTYPE, OH_IDNR
     from FolderHierarchy
     inner join OFS on IDNR = OFS_OH_Idnr_F
     inner join OH on OFS_OH_Idnr_O = OH_Idnr
) select * from FolderHierarchy;

Outcomes