I believe this is the query (in Oracle) that was desired...
select cmid, objname, SYS_CONNECT_BY_PATH(o.objname, ' > ') path
from (
select obj.CMID CMID, case when obj.cmid = obj.pcmid then null else obj.PCMID end PCMID, nm.name objname
from CMOBJECTS obj inner join CMOBJNAMES nm on obj.cmid = nm.cmid
where nm.isdefault = 1
) o
where objname like '

' -- <<<< Your object name here
start with o.PCMID = 0
connect by prior o.CMID = o.PCMID