Diagnose join duplicates before using DISTINCT, verify order and payment totals, and choose aggregation or EXISTS for the required result.
FORMAT Function in SQL Server: Dates, Numbers and Speed
The FORMAT function turns a date or a number into text with one pattern, and it needs SQL Server 2012 or later. This post shows the patterns for dates and numbers, the culture argument, and the lower case mm that silently returns minutes instead of the month. It also measures FORMAT against CONVERT over 200,000 rows, so you know when to use which.
How to Add Column at Specific Location in Table? – Interview Question of the Week #126
Question: How to Add Column at Specific Location in Table?
Answer: Order of the column in the table should not matter.
SQL SERVER – Not Able to Kill SPID with KILL WITH STATUSONLY
Can’t kill SPID with KILL WITH STATUSONLY? It reports a rollback, it does not start one. Why KILLED ROLLBACK lasts, and why to wait.
SQL SERVER – Loopback Linked Servers and OPENQUERY with Current Drivers
A LoopBack Linked Server connects back to the same SQL Server instance. I review its provider, identity and transaction restrictions first.
SQL SERVER – How to Update Two Tables in One Statement?
One Statement normally updates one target table in SQL Server. I use a transaction when two changes must succeed together.







