Checking Tempdb with dbatools
I really like the dbatools project. This is a series of PowerShell cmdlets that are built by the community and...
2018-04-20
1,595 reads
I really like the dbatools project. This is a series of PowerShell cmdlets that are built by the community and...
2018-04-20
1,595 reads
I’m speaking at two upcoming events that I wanted to share with you! My topic is Monitoring and Tuning Azure...
2018-04-20
312 reads
WMI has been around for a while and it has grown significantly over the years. With Microsoft's focus on powershell,...
2018-04-20
12,297 reads
USE master
exec sp_MSforeachdb '
use [?]
print ''?''
print cast(databasepropertyex(''?'', ''Updateability'') as varchar(200))
if databasepropertyex(''?'', ''Updateability'') = ''READ_WRITE ''
dbcc shrinkfile(2,1)
'
2018-04-20
322 reads
What SQL command do you use to pull and filter data from a table ?
SELECT [Column List] FROM [Table Name]...
2018-04-20
455 reads
2018-04-20
For one of my clients, I needed to know and document not only database names, size and locations but also...
2018-04-19
605 reads
When you restore a database, it will also restore all permissions along with it. But what if you are restoring...
2018-04-19
12,427 reads
I was working for a client on their very critical and heavily used database. The application was an E-commerce website...
2018-04-19
8,063 reads
If you ever had a need to start a SQL job using sp_start_job stored procedure in msdb then you know...
2018-04-19
15,889 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