Category Archives: T-SQL

Converting SQL SERVER DateTime? Test it thoroughly….

Today one of my user complained that a report was missing one particular ticket from the output. The report in question is very simple, it accepts start date & end date and filters on the ticket creation date time column … Continue reading

Posted in T-SQL | 10 Comments

SQL SERVER 2008: cdc.fn_cdc_get_net_changes returns NULL row

Wanted to blog about this issue for long time but somehow it did not materialize. Recently one of my colleague faced this issue and I decided that this is the time to put it in the blog. I was working … Continue reading

Posted in T-SQL | Leave a comment

Insufficient result space to convert uniqueidentifier value to char

Recently when I was trying to convert a UNIQUEIDENTIFIER to CHAR, I got an error like  Insufficient result space to convert uniqueidentifier value to char   My statement was something like  SELECT CONVERT(CHAR, NEWID())  I have faced this issue many times and … Continue reading

Posted in T-SQL | Leave a comment

SQL Server 2008 Compression & Fragmentation

Few weeks back  I was evaluating implementing database compression in one of our data warehouse project. The first thought that came to my mind was how does compression impacts the fragmentations, because we had a performance issue with the index due to … Continue reading

Posted in T-SQL | 2 Comments

SQL Server: String Concatenation and Implicit Conversion

Sometimes you tend to forget the very basic thing in the heat of the moment and struggle for a while. When you realize it, you have nothing but a big grin. This happened to me few days back 🙂 One of … Continue reading

Posted in T-SQL | Leave a comment