Skip to content

Tag: sql-server

MSSQL BIT_COUNT (Hammingdistance)

Is there any function similar to the MYSQL BIT_COUNT function in MSSQL? I want to create a very simple Hammingdistance function in MSSQL that i can use in my selects. Here is what i have for MYSQL: Answer Why not just write your own bit_count code in T-SQL? There’s no need to use SQL CLR if all you need…

inflation calculation in MS SQL

I have the below requirement to fulfill. How to achieve this simplistically. There is an inflation rate table as below I need to first get And then get Answer I think the best way to do this on SQLserver is to use a common table expression with recursion. I’m not 100% sure because I can’t test it …