Thank you appnair. I got the query, but not 100% accurate, it gives path in reverse order, but this is ok. I'm using Java code, to call and change this.
select connect_by_root(d.dataid) dataid, SYS_CONNECT_BY_PATH(d.name, '/') path from dtree d where connect_by_isleaf =1 start with d.dataid=...