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: Mercadante, Thomas F (LABOR) <Thomas.Mercadante_at_labor.state.ny.us>
Date: Fri, 15 Jun 2007 13:01:51 -0400
Message-ID: <ABB9D76E187C5146AB5683F5A07336FFE08ECD@EXCNYSM0A1AJ.nysemail.nyenet>


Citali,

If what you need to do is to make the value within a column to be the negative of itself, then the following would do it. Note that this even updates negative numbers to itself because the ABS function takes the absolute value of the column and returns a positive value.  

update xyz
set flag = abs(flag) * -1

Hope this helps.

Tom

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Guerrero, Citlali (GE, Corporate, consultant)
Sent: Friday, June 15, 2007 12:40 PM
To: oracle-l
Subject: % Negation Character

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 - 12:01:51 CDT

Original text of this message

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