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: Unable to use Decode on RAW columns ?

Re: Unable to use Decode on RAW columns ?

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Thu, 08 Jul 1999 07:53:48 -0400
Message-ID: <3784914B.81051F4@Unforgettable.com>


Why are you using a raw column in the first place? RAW should only be used for binary values and the single value of '20' (hex) really isn't what is intended.

Mirza Mohsin Beg wrote:

> Can anyone explain what I am doing wrong below ?
>
> What could be the workaround since I need to do the same in Pro*C for
> some large binary strings.
>
> Thanks and please email me directly also.
>
> -M
>
> ---------------------------------------
>
> SQL> create table a_table (a_col long raw);
>
> Table created.
>
> SQL> insert into a_table values (hextoraw('20'));
>
> 1 row created.
>
> SQL> update a_table set a_col = decode(1, 1, a_col, hextoraw('20'));
> update a_table set a_col = decode(1, 1, a_col, hextoraw('20'))
> *
>
> ERROR at line 1:
> ORA-00932: inconsistent datatypes
>
> SQL>
Received on Thu Jul 08 1999 - 06:53:48 CDT

Original text of this message

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