Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitwise operator in firebird

Can we do bitwise and in a firebird procedure without using a UDF? is there one of the built in function or is there a way to get the same results with standard built in commands?

I tried http://www.firebirdsql.org/refdocs/langrefupd21-intfunc-bin_and.html (BIN_AND) also but i need some implementation without UDF.

Ex: (3 & 3) returns 3 in SQL but not in firebird(firebird 2.1).

like image 751
Rohit Vats Avatar asked Sep 13 '11 13:09

Rohit Vats


1 Answers

Firebird doesn't have bitwise operators, the BIN_AND() function is the way to go. Since Firebird 2.1 those BIN_* functions are internal functions, ie they are always available without need to any external DLL or registering them as UDF.

like image 111
ain Avatar answered Oct 07 '22 09:10

ain