Re: % Negation Character

  • From: Carel-Jan Engel <cjpengel.dbalert@xxxxxxxxx>
  • To: citlali.guerrero@xxxxxx
  • Date: Fri, 15 Jun 2007 20:11:29 +0200

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
> 
> --
> //www.freelists.org/webpage/oracle-l
> 
> 



Other related posts: