SQL Server
-
A (more) concise way to test a SQL MERGE for differences if there are nulls involved
In SQL, if you need to compare two columns that are both nullable, your compare statements can quickly get out of hand (and a lot less readable along the way). While fixing a bug in my code, I found out… Continue reading
-
If you publish a WCF service using EF to IIS, do not forget to distribute sqlserver.dll manually
I’ve spent several hours this week debugging a WCF application using Entity Framework, that was published to an IIS server, only to have every call to the service fill with the error message “The type initializer for [My]DbContext has caused… Continue reading
-
You cannot use a null propagating operator in an expression tree lambda
One of the features I like about the new C# 6.0 is the null conditional operator, and I tend to use it everywhere I can (and should). Until yesterday, when at a statement I wasn’t expecting it, the compiler bit… Continue reading
-
An underrated operator: using EXCEPT in MS SQL Server to track changes
Working with a colleague who is a longtime Oracle user, I noticed he used an operator I didn’t know of, to grab hold of the differences in rows between two nearly identical tables: he used a “minus”. I couldn’t imagine… Continue reading
-
Update to SQL server tooling for Visual Studio
MS recently released the “March 2014” update to the SQL Server tooling for Visual Studio 2013, which was named SQL Server Data Tools for previous Visual Studio versions. Among the most notable new features are support for SQL Server 2014… Continue reading
-
SQL server views performing really bad when referencing a linked server
We had a view in SQL server (2008) that consisted of a simple SELECT with some fields from a table that was on another database server (an Oracle database even). Performance was not a problem, the query took less than… Continue reading