Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

Part Number E23381-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

BITAND

BITAND computes an AND operation on the bits of two nonnegative integers, and returns an integer. This function is commonly used with the DECODE function.

An AND operation compares two bit values. If both values are 1, the operator returns 1. If one or both values are 0, the operator returns 0.

Return Value

NUMBER

Syntax

BITAND(expr1, expr2) 

Arguments

expr1 and expr2 are numeric expressions for nonnegative integers.

Example

BITAND(7, 29) returns the value 5.

The binary value of 7 is 111 and of 29 is 11101. A bit-by-bit comparison generates the binary value 101, which is decimal 5.