This is a great feature of Oracle SQL, I'm sure many will find it useful.
I used to use it for getting the location hierarchy but we recently moved from Oracle SQL to SQL Server and I'm now struggling to achieve the same results.
I've got this far, but it's not quite right.
WITH HierarchyCTE(location, parent, path, systemid)AS
(SELECT location, parent, CAST(parent AS varchar(1024)), systemid
FROM lochierarchy
WHERE parent = 'CPP-390E' and systemid = 'PRIMARY'
UNION ALL
SELECT c.location, c.parent, CAST(p.path + ' \ ' + c.location AS varchar(1024)), c.systemid
FROM lochierarchy AS c INNER JOIN HierarchyCTE AS p ON c.parent = p.location WHERE c.systemid = 'PRIMARY' )
SELECT location, parent, path, systemid
FROM HierarchyCTE
I'd like to get to

But I'm getting

Hopefully someone might be able to help.
------------------------------
Richard White
------------------------------
Original Message:
Sent: Wed June 09, 2021 04:18 PM
From: User1971
Subject: Get classification hierarchy path (Oracle SQL)
MAM 7.6.1.2; Oracle 19c:
I thought I'd share a query that I use to generate the classification hierarchy path via SQL:
select ltrim(sys_connect_by_path(classificationid, ' \ '),' \ ') as hierarchypathfrom maximo.classstructurestart with parent is nullconnect by prior classstructureid = parent

I thought that might be useful to someone. It's certainly been handy for me.
#AssetandFacilitiesManagement
#Maximo