Altering Table structure - SSMS - Timeout Expired
Altering a table using SQL Server Management Studio ( SSMS ) can be done by right clicking on the table and by...
2011-06-17
390 reads
Altering a table using SQL Server Management Studio ( SSMS ) can be done by right clicking on the table and by...
2011-06-17
390 reads
Sometimes, a simple task that as a DBA you do day in and day out,
can throw wierd errors.
You...
2011-06-12
412 reads
I am back again!!!. It has been ages since I posted.An important event in my life kept me away from...
2011-06-11
344 reads
A file growth operation on a database server is a extremely expensive operation. Many Performance problems correlate to a Data...
2011-01-04
501 reads
Most of us are aware of tracing queries using SQL profiler. But an effective way of performing tracing is using...
2010-12-24
516 reads
Stumbled upon this PDF from quest which lists the important Perfmon counters and their acceptable values. A must print and...
2010-12-08
504 reads
Lock escalation is a event which occurs when SQL Server decides to upgrade a lock at a lower level hierarchy...
2010-11-29
1,340 reads
BACKUP LOG <db_name> WITH truncate_only command, used for clearing the log file, is deprecated in SQL Server 2008. So this post will explain option...
2010-11-16
1,693 reads
The last post dealt with checking CPU pressure using wait_stats DMV. But, to get a complete picture of CPU Pressure,...
2010-11-09
802 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