2016-10-28 (first published: 2016-10-05)
23,091 reads
2016-10-28 (first published: 2016-10-05)
23,091 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)
842 reads
If you want to extract only deadlock details, use the script.
2016-10-24 (first published: 2014-12-03)
3,947 reads
2016-10-21 (first published: 2015-05-12)
2,436 reads
2016-10-20 (first published: 2015-05-15)
1,668 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)
531 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,120 reads
2016-10-17 (first published: 2016-10-03)
895 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,435 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)
387 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Nitazoxanide 500 mg Buy Online is a search term used by people looking for...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers