Find Login in Active Directory
Find Login in AD
Many times we require to know if particular login is a part of ad user group. Or...
2012-01-29
871 reads
Find Login in AD
Many times we require to know if particular login is a part of ad user group. Or...
2012-01-29
871 reads
*This is related to physical file size of a MDF or LDF file not internal allocation.
One of our user asked...
2012-01-18
5,263 reads
Good Bye 2011
Hey there, this year is going to an end and just want to recall what all happened this...
2011-12-31
1,298 reads
Basics QA on Extended Event
I am learning Extended Event so this is my first blog on extended event, There is...
2011-12-23
1,803 reads
Suspect database generally caused by internal IO issue, and the best way to resolve it to ask hardware person to...
2011-12-19
495 reads
We come across a situation where we have to kill one spid which was running for quite some time, so...
2011-12-17
3,567 reads
As I did for powershell a day Series Blog April 2011, consolidated the all months blog into one pdf file here....
2011-11-30
1,437 reads
Day 30 More Fatal Errors and BUGs
For sql server 2000 and earlier you may get 5242 and 5243 corruption in...
2011-11-30
2,147 reads
Description:-
Yesterday, we discussed what happen when tempdb data file grown very high, now what if log file of any user...
2011-11-29
536 reads
Day 29: Fatal Errors 823, 824, 825, 832, OS error 23
Error 823: IO error OS cannot read the data
Error: 823,...
2011-11-29
14,085 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 Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
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