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

Home -> Community -> Usenet -> c.d.o.server -> Re: What is wrong ?

Re: What is wrong ?

From: Daniel A. Morgan <damorgan_at_exesolutions.com>
Date: Fri, 01 Feb 2002 16:55:16 +0000
Message-ID: <3C5AC874.1BBD957E@exesolutions.com>


As you didn't post the error message it is impossible to help you.

Did you want us to just guess?

Or do they charge you more if you post more characters? <g>

Daniel Morgan

Josef wrote:

> Hi,
>
> i am trying to create select query. the query should include
> all columns of a table, table name, column_name of the constraint,
> constraint name,constraint type.
>
> some thing is wrong is in my query !!!!
>
> SELECT DISTINCT ALL_CONS_COLUMNS.COLUMN_NAME
> "ALL_CONS_COLUMNS.COLUMN_NAME",
> ALL_TAB_COLUMNS.TABLE_NAME "ALL_TAB_COLUMNS.TABLE_NAME",
> ALL_TAB_COLUMNS.COLUMN_NAME "ALL_TAB_COLUMNS.COLUMN_NAME",
> CON.CONSTRAINT_NAME CONSTRAINT_NAME,
> DECODE(CONSTRAINT_TYPE,'P','PRIMARY','R','FOREIGN','C','','V','','U','')
> FROM SYS.ALL_CONS_COLUMNS ALL_CONS_COLUMNS,
> SYS.ALL_TAB_COLUMNS ALL_TAB_COLUMNS,
> SYS.ALL_CONSTRAINTS CON
> WHERE ALL_TAB_COLUMNS.TABLE_NAME = ALL_CONS_COLUMNS.TABLE_NAME (+)
> AND ALL_TAB_COLUMNS.COLUMN_NAME = ALL_CONS_COLUMNS.COLUMN_NAME(+)
> AND ALL_CONS_COLUMNS.CONSTRAINT_NAME = CON.CONSTRAINT_NAME;
>
> can someone help please ?
Received on Fri Feb 01 2002 - 10:55:16 CST

Original text of this message

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