How Do I Identify Invalid or Unneeded Logins?
Introduction
I was looking at one of my servers and was caught off-guard by how many individual users had been granted...
2010-04-07
530 reads
Introduction
I was looking at one of my servers and was caught off-guard by how many individual users had been granted...
2010-04-07
530 reads
Introduction
From time to time I get asked to check if a stored procedure is still used in preparation for dropping...
2010-04-06
511 reads
Introduction
I was recently working a production issue that required me to log in via the Dedicated Administrator Connection (DAC). When...
2010-04-05
351 reads
Introduction
In an earlier post I walked through the diagnosis of a problem with TokenAndPermUserStore bloat in SQL 2005.In this post...
2010-03-25
1,105 reads
Introduction
For that past couple of months I have been chasing performance issues with one of the most high profile servers...
2010-03-09
513 reads
Introduction
Recently a coworker was doing some research with SQL 2008 Backup Compression on a very large database. During the testing...
2010-02-25
435 reads
Introduction
I am frequently getting requests for a new server to do this or that. Running through the usual questions to...
2010-02-23
483 reads
Introduction
Here is another one of my utility scripts. Lately it seems like all I am blogging about is utility scripts,...
2010-02-01
2,661 reads
Introduction
Ever need a programmatic way to figure out if a SQL Agent job is running? I did. After spending a...
2010-01-31
2,571 reads
Introduction
Lately it seems like I am being bombarded by Dynamic SQL and people who insist it is the only way...
2010-01-21
654 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...
Comments posted to this topic are about the item Risk Vs Reward, The never...
Telp/Wa 628217555651 Ruko Harmoni Plaza Blok B No. 26-27, Jl. Suryopranoto No.2, RT.2/RW.8, Petojo...
Comments posted to this topic are about the item Using CHOOSE()
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