Getting SQLServers Last Known Good DBCC Checkdb with PowerShell and dbatools
As good SQL Server DBA’s we want to ensure that our databases are regularly checked for consistency by running DBCC...
2017-04-05
663 reads
As good SQL Server DBA’s we want to ensure that our databases are regularly checked for consistency by running DBCC...
2017-04-05
663 reads
Wellll .. technically there is no native way to do it. I even went through my notes on identity columns. No...
2017-04-05
498 reads
If you’ve been involved in technology for any length of time you are aware of outside threats to your network...
2017-04-05
376 reads
If there’s one thing that SQL Server is really good at, it’s relationships. After all, a relational database management system...
2017-04-05
122 reads
In a previous post I showed how easy it is to test your backups using Test-DbaLastBackup
Today I thought I would...
2017-04-05 (first published: 2017-03-22)
1,934 reads
Microsoft recently introduced a handy new feature to query plans: waitstats. That’s right, you can get actual runtime waitstats for...
2017-04-05
508 reads
I think SQL Clone is a useful, handy product. It’s what I’ve needed in a number of organizations, or it’s...
2017-04-05
650 reads
In a previous post, I showed how to set up statistics maintenance for your Azure databases using Azure Automation. However,...
2017-04-04
638 reads
I was recently reading this msdn article on Ghost Records, and it mentioned that you could get the number of...
2017-04-04 (first published: 2017-03-22)
10,239 reads
I want to show you how I went from having multiple single SQL databases in Azure to a database elastic...
2017-04-04
591 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...
Telp/Wa 628218200203 Gedung Sutrado, Jl. Kenari 2 No.5 Lt. 1, RT.2/RW.3, Kenari, Kec. Senen,...
Telp/Wa 628218200203 Jl. Biak No.44 AB, RT.8/RW.11, Cideng, Kecamatan Gambir, Kota Jakarta Pusat, Daerah...
Telp/Wa 628217555651 Gedung Plaza Bank Index Ground, Jl. M.H. Thamrin No.57 Floor Suite GF-21,...
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