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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: % Negation Character

Re: % Negation Character

From: Carel-Jan Engel <cjpengel.dbalert_at_xs4all.nl>
Date: Fri, 15 Jun 2007 20:11:29 +0200
Message-Id: <1181931089.7456.118.camel@lagavulin.dbalert.eu>


Hi Citlali,

Go to google, and search for 'Oracle' and 'bitand'

The link to Jonathan Lewis' site (2nd result of the Google search) is quite helpful.

Think out of the box. Your negation operation is like an XOR with a string of '1' bits of the same length.

So, something along the lines of:

flag AND (4589 XOR 1111111111111)

should do the job.

Best regards,

Carel-Jan Engel

===
If you think education is expensive, try ignorance. (Derek Bok) ===

On Fri, 2007-06-15 at 11:39 -0500, Guerrero, Citlali (GE, Corporate, consultant) wrote:

> Hi Folks,
>
> I'm migrating from Sybase to Oracle, on Sybase I had a function with
> and update:
>
> update XYZ
> set flag = flag &~4589
>
> Now on Sybase "~" character is used as negative character, so the
> query do this (on sybase): Update the table XYZ on the Flag column with
> the bitand beteewn flag and 4589 if the binary bit corresponding to this
> value is not ON ...
>
> How can I do this on Oracle?? I mean is there any negation character
> on oracle similiar to ~ on Sybase?? I been searching but I still don't
> find anything helpful, could someone advice about this??
>
> Thanks in advanced.
>
> Cheers, Citlali
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 15 2007 - 13:11:29 CDT

Original text of this message

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