Showing posts with label valuesi. Show all posts
Showing posts with label valuesi. Show all posts

Monday, March 26, 2012

geting value from binary

hi,
is it possible to get value as follows in SQL server
I will have values in 101, 111 like in binary , I want to get its decimal values
I want to get 5 for 101, 7 for 111 ...
please let me know ...
RamSo, you have a string containing a kind of binary number?

Consider to solve this in a user-defined function. Loop through your string, and compute the power of 2 if applicable.