SQLServerCentral Article

Seven Showplan Red Flags

SQL Server showplan is a great tool for analyzing queries and determining whether or not more performance tuning needs to be done. However working with showplan can be confusing and it takes some practice to learn the ins and outs of what is occurring. Joseph Sack looks at showplan and seven of the main things that he is aware of when looking at the results. If you've rarely or never used showplan, this is a great article to get started in learning how an experienced DBA views the output.

SQLServerCentral Article

An Is Null Gotcha

In T-SQL you should use the IS NULL keywords to test for a null value. But David Poole runs into a strange gotcha in one of his applications where he is testing for a null value. It's an interesting read following Sherlock Poole around on his hunt to find an error.

SQLServerCentral Article

DTS Parallel Processing

SQL Server DTS is an amazing ETL tool. Parallel processing is not only possible, but author Leo Peysakhovich shows us how he does it in this article about his index rebuild process. By bundling DTS into SQL Server for free, Microsoft gave us a platform for not only ETL, but also many basic tasks that all DBAs are stuck working on. Read on to see if parallel processing of index rebuilds is something you can use.

SQLServerCentral Article

Save Your Password

Storing passwords in SQL Server for authentication by your application is a common practice. But not always a good one. Someone with access could easily see all passwords and perhaps cause mischief inside your application. Imagine the office gossip getting access to your HR application as the HR director! Not a good thing. Dinesh Asanka has written a short piece on how you can use a built in function in SQL Server to encrypt these passwords and use them with a minimum of effort.

SQLServerCentral Article

SQL Server Express

SQL Server Express 2005 is a new product that has been released (in Beta) as a followon to the MSDE product. A number of new features as well as complementary products for all of the .NET development tools are now available. Read on for a quick summary of what this new product line is all about.

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