Articles

SQLServerCentral Article

A Normalization Primer

For most DBAs, normalization is an understood concept, a bread and butter bit of knowledge. However, it is not at all unusual to review a database design by a development group for an OLTP (OnLine Transaction Processing) environment and find that the schema chosen is anything but properly normalized. This article by Brian Kelley will give you the core knowledge to data model.

5 (3)

You rated this post out of 5. Change rating

2003-01-13

18,587 reads

SQLServerCentral Article

Case Study: Importing New Data Without Emptying Existing Tables

The challenge for Robert Marda was to devise a way to keep the data available at all times while importing the new data, detect if a full or daily update was received and run appropriate data pumps, put in sufficient fail safes to ensure bad data would not get imported, and to make the process automatic including notification to pagers upon failure. Robert shows you how he did it here.

You rated this post out of 5. Change rating

2003-01-09

8,202 reads

SQLServerCentral Article

Default Values and Named Parameters for Stored Procs

Are you using default values for your parameters? Using named parameters when you call the proc or passing the values by ordinal? Should you be? Andy thinks 6 out of 10 of our readers will agree with his point of view, we'll be a little more conservative and guess that 5 of out 10 will be closer.

5 (1)

You rated this post out of 5. Change rating

2003-01-08

8,206 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

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...

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...

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