SQLServerCentral Article

Extracting a String From Between Two Delimiting Characters

String manipulation in SQL Server or T-SQL can be a challenage. There are multiple ways to accomplish every task and often learning a new one may spark some creativity in yourself or teach you a better way to accomplish an old task. New Author Stephen Lasham brings us his technique for extracting a string that is delimited from within a larger string. Something I'm sure we'll all have use for in the future.

SQLServerCentral Article

An Introduction to InfoPath 2003

Office 2003 has a new tool: InfoPath 2003, which can work with SQL Server along with numerous other data stores. It's a great way to begin working with XML, Web Services, and many of the newer technologies that are available today. Join Dinesh Askanka on his journey to learn more about InfoPath2003 in the start of another series.

Technical Article

Advanced Data Generator

Upscene Productions is happy to announce a new version of
the database developer tool: "Advanced Data Generator" (version 1.1.0)

A fast test-data generator tool that comes with a library
of real-life data, presets and much more.

This new release consists of four versions:

- Pro: ADO and ODBC connectivity
- InterBase Edition
- Firebird Edition
- MySQL Edition

More info, pricing and a 30-day trial version on www.upscene.com

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

How to determine if a DB is currently being used

By dax.latchford

Hi - I'm looking for advice regarding the best & quickest way to establish...

Data cleansing/conversion tool HPE

By juliava

Hello.   I am looking for a tool Data cleansing/conversion, was recommended HPE any...

System views in a contained availability group

By mark4data

I have a query that runs in a job to check on orphaned users....

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