Before SQL Server 2012 you needed CONVERT with style codes to format dates. See how the FORMAT function gives you dd/mm/yyyy, mm/dd/yyyy and more in one call.
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.
How to Round Up or Round Down Number in SQL Server? – Interview Question of the Week #125
How do you round up or round down a number in SQL Server? A quick answer using ROUND, CEILING and FLOOR, and how each one behaves.
SQL SERVER – Alternate to AGENT_DATETIME Function
An alternate to AGENT_DATETIME: convert integer date and time values to a datetime with CAST and STUFF, without any msdb function or permission issue.
Why SELECT HOST_NAME() Returns Empty String? – Interview Question of the Week #119
Question: Why SELECT HOST_NAME() Returns Empty String while connected from certain .net application?
What is the Difference between TRUNCATE and DELETE in SQL Server? – Interview Question of the Week #118
What is the difference between TRUNCATE and DELETE in SQL Server? An interview question that never gets old, with a clear list of the differences.
How to Get Random Records from Table? – Interview Question of the Week #105
How do you get random records from a table? This interview question never gets old. Here is the ORDER BY method I use because its syntax is easy to remember.




