You can ORDER BY a column alias, so why not use it in WHERE? A simple example that shows how SQL Server assigns a Column Alias and where it is in scope.
SQL SERVER – SPID is KILLED/ROLLBACK state. What to Do Next?
Your SPID shows KILLED/ROLLBACK and never seems to finish. Here is what that state means, why SQL Server sometimes cannot undo the work and what to do next.
Interview Question of the Week #033 – How to Invalidate Procedure Cache of SQL Server?
Clear procedure cache at the narrowest useful scope, remove one plan handle, and compare sp_recompile with statement recompilation.
SQL SERVER – Unable to Bring SQL Cluster Resource Online – Online Pending and then Failed
A SQL Cluster Resource started from services.msc but sat in Online Pending and then failed in Failover Cluster Manager. Here is how I tracked down the cause.
SQL SERVER – Understanding the Basics of Write Ahead Logging (WAL) Protocol
Doing the basics right matters. Here is a simple, story-driven explanation of the Write Ahead Logging (WAL) protocol that keeps SQL Server transactions safe.






