SQL_VARIANT_PROPERTY exposes a variant’s BaseType. Compare numeric, date, string and binary inputs with their stored base types intact.
SQL SERVER – Denali – DMV Enhancement – sys.dm_exec_query_stats – New Columns
SQL Server Denali adds four new columns to sys.dm_exec_query_stats, like total_rows and last_rows, so you can see how many rows your queries returned.
Stop Chasing Every Seek: When a Table Scan Is the Right Plan
A Clustered Index Scan is not always the problem. Count the reads for a seek with lookups, a scan and the optimizer’s own pick, then see when the seek really wins.
A Shared SEQUENCE for Invoices and Credit Notes in One Range
One sequence, two tables, and an auditor asking about number 8. See where gaps come from, how duplicates sneak in, and where uniqueness should live.
SQL SERVER – Denali – Date and Time Functions – EOMONTH() – A Quick Introduction
A quick introduction to the EOMONTH function in SQL Server Denali: get the last day of the month for a date, one of seven new date and time functions.
SQL SERVER 2012 – DateTime Functions – DATEFROMPARTS() – DATETIMEFROMPARTS() – DATETIME2FROMPARTS()
SQL Server 2012 adds seven new datetime functions, such as DATEFROMPARTS, DATETIMEFROMPARTS and EOMONTH. A quick look at building dates from their parts.
Moving Averages in T-SQL
Moving averages in T-SQL use ROWS BETWEEN for rolling windows, but date gaps and duplicate dates decide what the result actually means.







