select a.object_id object_id from table1 a,table2 b connect by prior field_code=a.object_id.
其中table1和table2为主子表关系。table1为主表,主键为object_id,子表field_code中存有纪录的上级
运行时报:ORA-01437: cannot have join with CONNECT BY。
请指点,不胜感激
把兩個表合并為一個表后(形成id,parent_id,data的形式),然后再使用connect by prior
子查询即可
b表中有没有object_id
为什么你的语句是:a.object_id.=a.object_id;
参考以下吧,一时也不知楼主语句在哪出错
http://expert.csdn.net/Expert/topic/1551/1551178.xml?temp=.5037653