Articles

Technical Article

Level up your learning in 2024 with PASS Data Community Summit

Connect, share and learn with the global data community in Seattle this November. Whether you're a DBA, Developer, Architect, Engineer or you're just getting started in your data career, there's a huge range of content for you to choose from (over 150 sessions and counting across 5 different tracks). Speakers this year include Steve Jones, Grant Fritchey, Ryan Booz, Bob Ward, Deepthi Goguri and Jennifer Stirrup. Check out the full program and register before September 18 to secure your ticket at the standard price.

2024-09-16 (first published: )

External Article

LIKE Constraints

In this article, I will cover a bit about the LIKE operator, including how it works, and a bit of history about why it is like it is. After establishing this, I will discuss a bit about how you can (and should) use the LIKE operator in your CHECK constraints to strengthen your data integrity.

2024-09-13

SQLServerCentral Article

SQL Server 2022 Build List

This is a list of the builds for SQL Server 2022. There are other build lists available here. A list of all the builds that I can find and install on my Build VM. If you find a build not listed here, please let the webmaster know (webmaster at sqlservercentral.com). All builds are listed in reverse […]

You rated this post out of 5. Change rating

2024-09-11 (first published: )

3,119 reads

Blogs

Free webinar – Tackling the Gaps and Islands Problem with T-SQL Window Functions

By

I’m hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM...

Counting Groups with Window Functions: #SQLNewBlogger

By

I looked at row_number() in a previous post. Now I want to build on...

Read the latest Blogs

Forums

Find rows with very close time stamps

By daytonbrown2

Given the following table and query, this will return any records(based on message_id) that...

How to merge two tables with unlike fields

By landonh

How to merge two tables with unlike fields. I have two table with one...

Visual Studio 22 / SSIS Project / (Project) Connection problem

By WilburSmith

Hello, First of all, I find it odd/annoying that I can't exclude a Project...

Visit the forum

Question of the Day

The LAGging NULL

I have this data in a SQL Server 2022 table:

player         yearid team HR
Alex Rodriguez 2012   NYY  18
Alex Rodriguez 2013   NYY  7
Alex Rodriguez 2014   NYY  NULL
Alex Rodriguez 2015   NYY  12
Alex Rodriguez 2016   NYY  9
If I run this code, what are the results returned in the hrgrowth column?
SELECT
  player
, yearid
, hr
, hr - LAG (hr, 1, 0) IGNORE NULLS OVER (ORDER BY yearid) AS hrgrowth
FROM dbo.playerstats;

See possible answers