Filtering on dates without losing an index means using searchable ranges; learn half-open boundaries, date and datetime differences, and plan checks.
SQL SERVER – 2008 – Row Constructors – Load Temp Tables From Stored Procedures
Load temp tables from stored procedures with a simple INSERT INTO EXEC instead of a loopback OPENQUERY. Here is the before and after code.
TAN: Keep the Angle Away From Its Undefined Point
TAN reads radians and returns float. These safe angles demonstrate sign and magnitude while explaining why a large finite float near ninety degrees is not a meaningful infinity.
SQL SERVER – SQL Slammer (Computer Worm)
Is there any virus associated with SQL Server? A DBA’s question led me to SQL Slammer, the computer worm that slowed down Internet traffic in January 2003.
PATINDEX and CHARINDEX: Pattern or Literal Search
PATINDEX and CHARINDEX answer different questions. Compare wildcard patterns with literal searches, preserve NULL, and pin collation for digit ranges.
Reading the Warnings in an Execution Plan
Warnings in an execution plan can reveal conversions, missing statistics, and spills; read each warning in workload context.
SQL SERVER – 2005 – Find Database Collation Using T-SQL and SSMS – Part 2
Reader jwwishart shared another way to find database collation in SQL Server 2005: a one line SELECT of collation_name from sys.databases.
SQL SERVER – 2005 – Restore Database Using Corrupt Datafiles (.mdf and .ldf) – Part 2
A last resort for corrupt datafiles with no backup: emergency mode, single user, then DBCC CHECKDB with repair_allow_data_loss. Back up the files first.
SQL SERVER – 2005 – Connection Strings For .NET
SQL Server 2005 connection strings for .NET, ODBC and OLE DB with SQL Native Client: standard security, trusted connection and named instance examples.
SQL SERVER – Change Order of Column In Database Tables
How do you change the order of column in a database table? SQL Server has no direct way, and I explain when column order matters and when it should not.










