Home » SQL & PL/SQL » SQL & PL/SQL » Hierachical Query - ORA-01436 Error
Hierachical Query - ORA-01436 Error [message #229894] Tue, 10 April 2007 04:49 Go to next message
gvsunil1
Messages: 7
Registered: April 2007
Location: hyderabad
Junior Member

SELECT TERM.TERMINALID, TERM.OPER_ADMIN_FLAG
FROM USERROLES ROLE, TERMINALMASTER TERM, BUSINESS_UNIT_TYPE BUS
WHERE ROLE.BUSINESS_UNIT_ID = TERM.BUSINESS_UNIT_PARENT_ID
AND TERM.BUSINESS_UNIT_TYPE_ID = BUS.ID
AND TERM.OPER_ADMIN_FLAG = 'O'
AND ROLE.USERMASTER_ID = 4171
CONNECT BY PRIOR TERM.TERMINALID = TERM.BUSINESS_UNIT_PARENT_ID
START WITH TERM.BUSINESS_UNIT_PARENT_ID = ROLE.BUSINESS_UNIT_ID;


when i am executing this query i am getting Connect by loop in user data....can any one help me....
terminalid is parent column
and business_unit_parent_id is child column in TERMINALMASTER
Re: Hierachical Query - ORA-01436 Error [message #229904 is a reply to message #229894] Tue, 10 April 2007 05:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64116
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Oracle version?

Re: Hierachical Query - ORA-01436 Error [message #230008 is a reply to message #229894] Tue, 10 April 2007 09:15 Go to previous messageGo to next message
gvsunil1
Messages: 7
Registered: April 2007
Location: hyderabad
Junior Member

Connected to Oracle9i Enterprise Edition Release 9.2.0.6.0
Re: Hierachical Query - ORA-01436 Error [message #230011 is a reply to message #230008] Tue, 10 April 2007 09:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64116
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Unfortunatly, in this version, you are stick with your loop problem in your data.

Regards
Michel
Re: Hierachical Query - ORA-01436 Error [message #230140 is a reply to message #229894] Wed, 11 April 2007 00:58 Go to previous message
michael_bialik
Messages: 611
Registered: July 2006
Senior Member
You can write PL/SQL to scan "manually" the hierarchy.

Previous Topic: String validation
Next Topic: How to optimize this SQL statement
Goto Forum:
  


Current Time: Tue Dec 06 02:24:57 CST 2016

Total time taken to generate the page: 0.13463 seconds