An introduction to LEAD and LAG in SQL Server 2012: read a value from the next or previous row without a self-join, with an AdventureWorks example.
SQL SERVER – Puzzle to Win Print Book – Functions FIRST_VALUE and LAST_VALUE with OVER clause and ORDER BY
Win a print book: a puzzle on how FIRST_VALUE and LAST_VALUE change with the OVER clause and ORDER BY, based on a question from Nilesh Molankar.
SQL SERVER – OVER clause with FIRST _VALUE and LAST_VALUE – Analytic Functions Introduced in SQL Server 2012 – ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
Why does LAST_VALUE change on every row? It is not a bug. The window frame explains it, and ROWS BETWEEN UNBOUNDED PRECEDING and FOLLOWING fixes it.
SQL SERVER – Introduction to FIRST _VALUE and LAST_VALUE – Analytic Functions Introduced in SQL Server 2012
An introduction to FIRST_VALUE and LAST_VALUE, new analytic functions in SQL Server 2012 that return the first and last value from a list.
SQL SERVER – Introduction to CUME_DIST – Analytic Functions Introduced in SQL Server 2012
An introduction to CUME_DIST, a new analytic function in SQL Server 2012 that returns the cumulative distribution of a value, with an example.
SQL SERVER – Detecting Database Case Sensitive Property using fn_helpcollations()
Is your database Case Sensitive? Find its collation, then look it up in fn_helpcollations() and read the description. A quick answer from my Office Hours.
SQL_VARIANT_PROPERTY: Inspect the Base Type
SQL_VARIANT_PROPERTY exposes a variant’s BaseType. Compare numeric, date, string and binary inputs with their stored base types intact.







