Getting top ranked employee detail for each department
Using OVER clause with ROW_NUMBER() function to get top ranked employee detail as per each department.
2016-10-25 (first published: 2016-10-03)
824 reads
Using OVER clause with ROW_NUMBER() function to get top ranked employee detail as per each department.
2016-10-25 (first published: 2016-10-03)
824 reads
If you want to extract only deadlock details, use the script.
2016-10-24 (first published: 2014-12-03)
3,923 reads
2016-10-21 (first published: 2015-05-12)
2,427 reads
2016-10-20 (first published: 2015-05-15)
1,648 reads
Calculates total length of services for a employee. Calculates( addition or subtraction) two internships in form of yy.mm.dd
2016-10-19 (first published: 2016-10-03)
519 reads
If you have a requirement where you need to copy all your backup files to any remote shared location from your local folder/drive and after that you need to do a periodic cleanup of the backup files, you can use my script.
2016-10-18 (first published: 2015-06-01)
2,102 reads
2016-10-17 (first published: 2016-10-03)
884 reads
When code is getting stall, sometimes the execution plans are point to the wrong or out dated or old objects. You would need to recompile all the stored procedures
2016-10-14 (first published: 2016-09-26)
4,409 reads
This stored procedure extracts template variable names and values from a SQL result set in order to process the template.
2016-10-13 (first published: 2016-09-14)
376 reads
SQLCMD is one of many methods to export your database data to some text file
2016-10-12 (first published: 2016-09-27)
22,185 reads
By Steve Jones
I was creating a question on sp_readerrorlog and realized that this procedure is different...
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
Comments posted to this topic are about the item The Disabled Index
Comments posted to this topic are about the item Server-Level Table sizes
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers