You are here:

## Blog Archive:

* Can be used in order to search for older blogs Entries

## Search in blogs

 KeywordsPhrase

## Blog Categories:

* Can be used in order to search for blogs Entries by Categories

## Blog Tags:

* Can be used in order to search for blogs by keywords

## TNWikiSummit

 Read this before you use the blog!

## T-SQL: Converting between Decimal, Binary, and Hexadecimal

By ronen ariely on 14/12/2015 10:38

I see in the forum this question raised all the time, and yet the solution that people get usually based on looping and complex math, while there is a simple and much better solution as shown in this code. In this short blog I will wrote a simple and VERY fast solution to convert Decimal number to Binary number, Decimal number to Hexadecimal number, and vise versa without using any loop. My solution for binary base is based on using BITWISE.

## Representing list of values using a single value

By ronen ariely on 29/10/2014 16:18

In some case we have to use single value, in order to represent a list of elements (values). This is a very common needs in hardware and software developing. All the logics that we discus in this article, can be implements regardless of database use. In this article we will focus on using SQL Server to implement our logics. This might be an external demand (applications for example) or even a result of bad database design. Yet, the needs is clear, we want to store multiple elements in one column. Those elements can be properties list, options, security permissions, dates, or any other data.

In this article we will go over several solutions, using different logics. Our challenge is to find a good logic, which give us a one-to-one correspondence, between each available combination of our elements, to a single value which represent this combination.

## עבודה עם דטא בינארי בעברית

By ronen ariely on 31/03/2011 14:55

נציג קוד קצר לעבודה עם דטא בינארי. הסבה מטקסט לבינארי והפוך