Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Creating user_constraint query with indents

Re: Creating user_constraint query with indents

From: CSI <mail34067_at_pop.net>
Date: 1997/03/17
Message-ID: <01bc3318$a2809a20$1118ced0@Proj-del7>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US