Purpose: This function converts a bit vector to it's corresponding numeric value
Syntax: Bin_To_Num(value1,value2,value3...,valueN)
Where,
value1,...valueN => are the bit vectors which can have either 0 or 1.
SQL> Select Bin_To_Num(0,1,0,1) Example1,Bin_To_Num(1,1,1,1) Example2 2 From Dual; EXAMPLE1 EXAMPLE2 ---------- ---------- 5 15
It is quite simple to understand
Hope it was useful.Thanks for reading
Tags: SQL Server, Oracle, #SQL SERVER,