How do you order column values by how close they are to any integer, such as -5? Here is a script that works the same way on SQL Server and MySQL.
SQL SERVER – SQL Server Configuration Checking – A Must Do for Every DBA – Notes from the Field #004
Still running on default settings? Mike Walsh explains why configuration checking is a must do for every DBA and how to fit SQL Server to your business.
SQL SERVER – Export Data AS CSV from Database Using SQLCMD
We often import CSV into SQL Server, but how do you export data as CSV with SQLCMD? Two simple commands, one with column headers and one without.
XQuery Comparisons: General Equality Is Not Singleton Equality
XQuery Comparisons use different rules for general sequence operators and singleton value operators. I make equality and inequality visible side by side. A general unequal-pair result is not always the inverse of an equal-pair result.
SQL SERVER – vCPUs – How Many Are Too Many CPU for SQL Server Virtualization ? – Notes from the Field #003
Do not blame virtualization for slow servers. David Klee explains how many vCPUs are too many for SQL Server virtualization and how to set them up right.
SELECT * Cost: Why Wide Result Sets Slow Exports
The query starts fast but the export crawls. A small demo shows how much a wide text column adds, and what to measure on your own server.






