This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
The red arrow indicates the use of the LEAD and LAG window functions.

SQL SERVER – Introduction to LEAD and LAG – Analytic Functions Introduced in SQL Server 2012

November 15, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

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.

Read More
Table with SalesOrderID and LastValue.

SQL SERVER – Puzzle to Win Print Book – Functions FIRST_VALUE and LAST_VALUE with OVER clause and ORDER BY

November 11, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

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.

Read More
SELECT statement with multiple columns.

SQL SERVER – OVER clause with FIRST _VALUE and LAST_VALUE – Analytic Functions Introduced in SQL Server 2012 – ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING

November 10, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

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.

Read More
SQL Server Analysis Tool Window.

SQL SERVER – Introduction to FIRST _VALUE and LAST_VALUE – Analytic Functions Introduced in SQL Server 2012

November 9, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

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.

Read More
An SQL Server results window.

SQL SERVER – Introduction to CUME_DIST – Analytic Functions Introduced in SQL Server 2012

November 8, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

An introduction to CUME_DIST, a new analytic function in SQL Server 2012 that returns the cumulative distribution of a value, with an example.

Read More
SQL SERVER - Detecting Database Case Sensitive Property using fn_helpcollations()

SQL SERVER – Detecting Database Case Sensitive Property using fn_helpcollations()

October 6, 2011
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL DMV, SQL Function, SQL Scripts, SQL Server

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.

Read More
Gouache painting: three identical white saucers on a counter each hold a small white mound that looks the same from a distance

SQL_VARIANT_PROPERTY: Inspect the Base Type

October 1, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

SQL_VARIANT_PROPERTY exposes a variant’s BaseType. Compare numeric, date, string and binary inputs with their stored base types intact.

Read More
Previous 1 … 39 40 41 42 43 44 45 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com