Articles

SQLServerCentral Article

Replication's Horizontal and Vertical Partitioning Capabilities

There are times that you may find yourself on a project where you have one data source and need to publish to many subscribing databases. Often times, Replication is not looked at as a viable solution to achieving this goal. For this project, Demico and Lynn will demonstrate the way we utilized the Horizontal and Vertical partitioning capabilities that Microsoft has added to the Replication utility.

You rated this post out of 5. Change rating

2003-02-07

5,416 reads

SQLServerCentral Article

Using Exotic Joins in SQL - Part 2

In the previous article, you saw how the BETWEEN operator could be used in joins to solve problems dealing with range-based data. In this article, Chris Cubley will show you how to take joins even further by using multiple criteria in joins as well as using the greater than, less than, and not equals operators in joins.

You rated this post out of 5. Change rating

2003-02-05

13,739 reads

SQLServerCentral Article

Who's to Blame for the SQL Slammer Virus?

Last week the SQL Sapphire (or SQL Slammer) virus hit corporate networks throughout the Internet. Although damage has not been estimated yet, it is sure to be in the tens of millions of dollars. So who is to blame when a virus like this manhandles a corporate environment?

You rated this post out of 5. Change rating

2003-02-03

5,836 reads

SQLServerCentral Article

Managing Jobs - Part 1

How many jobs do you have? 10? 100? 1000? Andy makes the point that what works to manage for a small number of jobs doesn't work when that number doubles or triples (well, unless you only had 1 job to start with!). In part one of two, this article looks at ideas for using categories and naming conventions to get things under control.

4 (1)

You rated this post out of 5. Change rating

2003-01-31

10,501 reads

SQLServerCentral Article

Freeware: Terminator Opens Gigabyte Files Easily

Ever tried to open 1 Gig ASCII file with Notepad? WordPad? Do you remember ASCII codes of Tab and Carriage Return? Enter Terminator; huge ASCII file viewer and BCP helper. Terminator reads top 10 (and more if asked) records of ASCII file of any size. It detects record terminators and calculates current cursor position (field offset) and length of selected area (field length). Best of all, it's free!

You rated this post out of 5. Change rating

2003-01-29

111 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

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

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

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