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
SQL SERVER - How to Access the Previous Row and Next Row value in SELECT statement? - Part 4

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 4

September 25, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL Table Operation

Part 4 on reading the previous row and next row value in a SELECT statement. My friend Szymon Wojcik shows how a numbers table can make the query even faster.

Read More
Window for retrieving previous and next rows in SELECT.

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 3

September 24, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function

My part 2 solution used ROW_NUMBER, which SQL Server 2000 does not have. Here is how to access the previous row and next row in SQL Server 2000.

Read More
Window for retrieving previous and next rows in SELECT.

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 2

September 23, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function

No CTE in your SQL Server 2005 code? Here is another way to get the previous row and next row value in a SELECT statement, using ROW_NUMBER.

Read More
Accessing previous and next row in query results.

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement?

September 22, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function

How do you access the previous row and next row value in a SELECT statement? In SQL Server 2012 the LEAD and LAG analytic functions make it simple.

Read More
A hand holding a red striped feather above scattered feathers, the two most similar lying closest

Vector Search in SQL Server 2025 With VECTOR_DISTANCE

September 13, 2013
Pinal Dave
SQL Tips and Tricks
AI, SQL Function, SQL Search, SQL Server

Use VECTOR_DISTANCE in SQL Server 2025 to rank small example vectors, compare cosine and euclidean distance, and plan larger searches.

Read More
A hand picking a single small star-shaped shell out of a long tideline of scattered shells on a beach.

Escaping Wildcards in LIKE: Searching for % and _ Literally

August 19, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

Handle escaping wildcards in SQL Server LIKE searches with brackets, ESCAPE, and a reusable function that preserves literal input.

Read More
Tool window with three different strings concatenated.

SQL SERVER – A Quick Note on CONCAT_NULL_YIELDS_NULL

July 5, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function

A friend ran SET CONCAT_NULL_YIELDS_NULL OFF above every script to deal with NULL columns. Here is a quick note on what it does and what I think of it.

Read More
Previous 1 … 26 27 28 29 30 31 32 … 62 Next
  • Books
  • Testimonials
  • Privacy Policy

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