Re: connect by prior = question

Re: connect by prior = question

 

  

where level < 3

António Pedro
----- Original Message -----
From: Gary Colbran (GJ)
To: LazyDBA Discussion
Sent: Thursday, September 30, 2004 8:54 AM
Subject: connect by prior = question



Hi,

If I use the connect by prior command in an sql statement, I
get the error ORA-01436: CONNECT BY loop in user data. I havn't
checked, but I assume that there is a loop in the data that is
retrieved. Anyone know how far through the query this function goes,
and how I can limit the depth of the query, i.e. if the 1st record
links to the 4th, which links to the 8th, which links to the first,
the loop occurs, but suppose I only want the first 3 records, then the
loop would not have occurred.

Anyone know how I could achieve this ?

Cheers

Gary

==================================================================
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html

Oracle LazyDBA home page