Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73

    Unanswered: Oracle bitand function

    Trying to use bitand and get the following error:

    SQL> select bitand(5,2) from dual;
    ERROR:
    ORA-00932: inconsistent datatypes
    no rows selected
    SQL>

    I must be doing something wrong, idea anyone?

    Thanks,

    Tal. (otal@mercury.co.il)

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Oracle bitand function

    You need to wrap the bitand function with a conversion function like TO_NUMBER or TO_CHAR:

    SQL> select to_number(bitand(5,2)) from dual
    SQL> /

    TO_NUMBER(BITAND(5,2))
    ----------------------
    0

  3. #3
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73

    Re: Oracle bitand function

    Originally posted by andrewst
    You need to wrap the bitand function with a conversion function like TO_NUMBER or TO_CHAR:

    SQL> select to_number(bitand(5,2)) from dual
    SQL> /

    TO_NUMBER(BITAND(5,2))
    ----------------------
    0

    Thanks,

    Tal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •