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: help: decode syntax

Re: help: decode syntax

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Tue, 09 Nov 1999 04:03:58 GMT
Message-ID: <38279D3A.86679272@rationalconcepts.com>


I haven't used decode, but it looks like you are not using the single quote character.
e.g 'C'.

cindy

kal121_at_yahoo.com wrote:

> Help - can anybody tell me what the problem is here? I've never had a
> problem with DECODE before on previous versions. It's either something
> very obvious that I'm missing or something strange on 8i.
>
> Version: Oracle 8i on Solaris
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> > SELECT dic.index_name index_name,
> 2 dic.column_name column_name,
> 3 DECODE(dc.constraint_type,
> 4 ‘C’, ‘Check Constraint’,
> 5 ‘P’, ‘Primary Key’,
> 6 ‘R’, ‘Foreign Key’,
> 7 ‘U’, ‘Unique’,
> 8 ‘Other’) constraint_type
> 9 FROM dba_ind_columns dic, dba_constraints dc
> 10 WHERE dic.table_name = table_name_in
> 11 AND dic.table_owner = user_name_in
> 12 AND dic.table_owner = dc.owner
> 13 AND dic.table_name = dc.table_name
> 14 ORDER BY index_name, column_position;
>
> ‘C’, ‘Check Constraint’,
> *
> ERROR at line 4:
> ORA-00911: invalid character
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Nov 08 1999 - 22:03:58 CST

Original text of this message

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