Hai All, I hav a treeview report query in which most of the time it works perfectly without any error
And at times i received the ORA-01427 - single-row subquery returns more than one row. Not sure why this is not working with certain dataid. The query is as below,
select parentid "parent-id", dataid "Objid", level, decode(subtype,612,'VT',202,'P',144,'Doc',0, 'F',1,'-->','Other') "Type",
substr(lpad('____________________________________________________________________________________________________',5*(level-1))||d1.name,0,100)
"Object",nvl(decode(d1.dataid,d1.dataid,(select dv.datasize/1024 from dversdata dv where dv.version = d1.versionnum and dv.docid = d1.dataid)),0)
"Size in Kb", nvl(d1.childcount,0) "ChildCount", d1.createdate "Created", decode(d1.userid,d1.userid,(select k1.name from kuaf k1
where k1.id = d1.userid )) "Owner", d1.modifydate "ModifyDate",d1.versionnum "Number of versions"
from dtree d1 connect by prior d1.dataid = abs(d1.parentid)
start with d1.dataid = #######