SQLServerCentral Article

How To Find SQL Server Objects

SQL Server can grow to encompass hundreds of databases on a single server, each having hundreds or thousands of objects within it. A truly scalable RDBMS. However, how many times have you been searching through the Object Browser in QA or the left pane in Enterprise Manager searching for an object? New Author Ashish Kaushal gives us a method to easily search your server for that long lost object.

SQLServerCentral Article

Analyzing Data Storage - Ten SHOWCONTIG Queries

Analyzing the data storage in SQL Server databases is a bit of an art. It's a skill that takes some time to develop given that the tools are rather limited. DBCC SHOWCONTIG is one of the few ways in which you can get some insight into how SQL Server has structured your table on the disk. Joe Sack brings us another of his top xxx techniques with his ten queries that you can use to analyze the results of this command.

SQLServerCentral Article

Review: MyLittleAdmin

SQL Server has great client side tools, Query Analyzer, Enterprise Manager, for working with your server and managing it. But how many times have you wished for a web interface because you didn't have VPN or didn't want to give rights to a developer. Or maybe you host clients' databases on your server and don't want one person to see another's databases. Read this review by someone who actually uses this product.

SQLServerCentral Article

SQL Server Alerts

SQL Server Alerts provide a great way for the server to notify a DBA that some event has occurred, usually something bad that they need to fix. However alerts can also be used to drive business logic processes and enable some types of actions to be safely performed without requiring extraordinary rights by a user. Author Leo Peysakhovich brings us some ideas on how we can use alerts to implement business logic processing.

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