The CASE Statement/Expression works anywhere an expression can, from the SELECT list to WHERE and HAVING. Here are its two basic forms with examples.
SQL SERVER – Stored Procedures Advantages and Best Advantage
My take on stored procedures advantages, and the best one of all: execution plan retention and reuse, since the rest can be had without them.
Low Memory Signals in the Resource Monitor Ring Buffer
Read the resource monitor ring buffer alongside Windows and process memory signals to investigate cache shrinkage in SQL Server.
SQL SERVER – SP Performance Improvement without changing T-SQL
Two easy ways to improve SP performance without changing T-SQL: do not prefix stored procedures with sp_, and call them by the fully qualified dbo name.
SQL SERVER – Search Text Field – CHARINDEX vs PATINDEX
CHARINDEX and PATINDEX both return the start position of a pattern in a text field. PATINDEX allows wildcards, CHARINDEX does not. Examples use AdventureWorks.
SQL SERVER – Performance Optimization of SQL Query and FileGroups
My tips on transaction log placement, FileGroups for tables and non-clustered indexes, database size and autogrow settings for better SQL Server performance.







