A client’s second clustered SQL Server instance failed to install: Specified instance via transform is already installed. Here is what I found and the fix.
SQL SERVER – Measuring the Length of VARCHAR and NVARCHAR Columns with COL_LENGTH
Does an NVARCHAR column take twice the space of VARCHAR? Yes. I measure the length of VARCHAR and NVARCHAR columns with COL_LENGTH to show it.
Count a Particular Value Across All Columns in SQL Server
To count a particular value across all columns of a table, use a CASE sum, CROSS APPLY with VALUES, UNPIVOT or UNION ALL. This post tests all four on a staff contact table, compares their reads on 200,000 rows, and builds the column list with dynamic SQL.
EXCEPT Operator in SQL Server: Distinct Rows and Differences
The EXCEPT operator returns the rows of one query that are missing from another, with duplicates removed. This post shows the difference between two small order tables, the old WHERE 1 = 0 trick for distinct rows, and how NULLs behave.
IIF in SQL Server: IF THEN Logic Compared With CASE
IIF in SQL Server is a short way to write IF THEN logic with two outcomes. This post compares it with CASE in a small juice shop table, shows that both produce the same plan, and covers NULL, data types and the WHERE clause.
SQL SERVER – T-SQL Script to Check SQL Server Job History
SQL Server Agent Job History can be queried from msdb. A New Zealand customer requested this report during our weekly health check.







