Changing SQL Server Agent Jobs Ownership: Who should own SQL Server Agent Jobs
I writing this blog post as a result of the following two questions, which I’ve been asked by one of...
2014-04-04
2,025 reads
I writing this blog post as a result of the following two questions, which I’ve been asked by one of...
2014-04-04
2,025 reads
After power surge last night, I realized few availability databases (also known as a “database replica”) have an unhealthy data...
2014-04-02
3,456 reads
One of the most important tasks on a DBA’s to-do list is backing up databases on a regular basis. This...
2014-03-16
1,277 reads
Today, we experienced performance issues with some of the SSRS reports that were deployed as part of the latest application/database...
2014-03-13
3,208 reads
Today, I received an email from the developer asking if there is a better way instead of the COUNT (*) Transact-SQL...
2014-03-06
1,332 reads
One of the key tasks of a DBA is to maintain the database indexes and make sure they are not...
2014-02-23
2,872 reads
Problem
Today, one of the developers come to me and asked me the question that is there any T-SQL function that...
2014-02-23
41,019 reads
Here is the simple query that returns basic information about all tables in a database that are partitioned:
SELECT SCHEMA_NAME([schema_id]) AS...
2014-02-17
1,491 reads
You can use the following two DMVs to give you that information:
sys.dm_exec_cached_plans – You can use this dynamic management view to...
2014-02-17
1,016 reads
We have about 200 user databases in which we have the full-text search enabled and these databases contain several tables....
2014-01-27
1,562 reads
I’m hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM...
By Steve Jones
I looked at row_number() in a previous post. Now I want to build on...
Recently I received a cry for help over Teams. The issue was that an...
Hello, First of all, I find it odd/annoying that I can't exclude a Project...
Hi - I'm looking for advice regarding the best & quickest way to establish...
Hello. I am looking for a tool Data cleansing/conversion, was recommended HPE any...
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 9If 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