Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Creating user_constraint query with indents
Hi scott,
user_constraints is a view with a join of the following tables : sys.con$, sys.con$ , sys.user$, sys.user$, sys.obj$, sys.cdef$
you cannot combine a hierarchical query ( CONNECT BY ) with a join.
-ram
Scott T. Johnson <sjohnson_at_ibm.net> wrote in article
<01bc32ca$8203c900$8d4948a6_at_7l603>...
> I am attempting to create a view of the user_constraints
> table that will show foreign key restraints on tables as
> indented for each table. I have attempted to use the
> connect by clause and keep getting the oracle error:
>
> SELECT LPAD(' ', 2* LEVEL)||table_name||' '||constraint_name||' '||
> delete_rule explain_plan
> from user_constraints
> where constraint_type = 'R'
> connect by constraint_name = r_constraint_name
> /
>
> ERROR at line 6:
> ORA-01437: cannot have join with CONNECT BY
>
> Can this be done? What am I doing wrong?
>
> Thanks,
> Scott
>
>
Received on Mon Mar 17 1997 - 00:00:00 CST
![]() |
![]() |