Its a common scenario these days to search for a string value within a delimited list. Though its not a good design to store delimited values inside a table field, I’ve come across numerous cases where I’ve inherited systems with…
system_sql_modules and all_sql modules views
Previously I’d blogged on the advantages of using sys.sql_modules view here http://visakhm.blogspot.in/2012/03/advantages-of-using-syssqlmodules-view.html There are two more related views available from SQL 2005 onwards. They’re sys.system_sql_modules and sys.all_sql_modules. So how are they different from sys.sql_modules? The difference is as followssys.sql_modules –…
Wildcard character based pattern search in T-SQL
Today happen to see a question based on wildcard characters search within a string pattern in a forum. I gave the solution for it and in my efforts found that the documentation given on this is not clear enough in…
Excel issues in handling intermixed data
I was doing some adhoc data importing from Excel to SQL server for some analysis and I encountered a strange issue. The excel was not returning data for some of the fields correctly. The excel data looks like below (for simplicity I’ve…
DQS Knowledge Discovery Project – Issues with geometric datatypes
Recently I was working on a data cleansing project using Microsoft Data Quality Services (DQS) in SQL 2012 and was trying to create a Knowledge discovery project by setting up a domain from a SQLServer table. The domain was created…
Delimited String Split – XML Parsing Method
I’d blogged previously on a string splitting function which splits up CSV onto individual valueshttp://visakhm.blogspot.in/2010/02/parsing-delimited-string.htmlThe same scenario can be handled by means of XML functions too. This blog provides a method of splitting up of delimited string into its component…
Calculating factorial in T-SQL
Couple of days before I got a question on one of the forums asking for user defined function to calculate factorial of a number. I came up with the below function for calculating factorial and thought I would share it…