TSQL-Tuesday#050 – Automation
TweetG’day,
Well, it’s the first TSQL-Tuesday of 2014 and one of my New Years resolutions for 2014 is to contribute to...
2014-01-14
1,312 reads
TweetG’day,
Well, it’s the first TSQL-Tuesday of 2014 and one of my New Years resolutions for 2014 is to contribute to...
2014-01-14
1,312 reads
TweetG’day folks,
I remember a fair few years ago when I was relativly new to TSQL creating a stored procedure that...
2014-01-13
1,273 reads
TweetG’day,
Just a quick post on a seemingly trivial matter that others may find useful.
The post was prompted by the Simple-Talk...
2013-12-30
1,380 reads
TweetSQL Saturday #252 Christchurch, New Zealand
G’day,
Well, these are exciting times for the Christchurch SQL SERVER User Group.
After a period of...
2013-07-28
1,179 reads
TweetG’day,
As part of any SQL SERVER install that I do, I turn on Remote admin connections (using sp_configure) and open...
2013-04-07
5,202 reads
TweetG’day,
Did you know that you can actually combine multiple SET operations into a single ALTER DATABASE statement.
It’s true, you can!
Mostly...
2013-04-06
4,325 reads
TweetG’day,
Recently, quite out of the blue I started seeing this error when I tried to log into my SQL instance...
2013-03-28
1,679 reads
TweetG’day,
Sometimes I come across what I call unusual coding practices. Developers usually have pressure on them to deliver and this...
2012-09-12 (first published: 2012-09-10)
2,397 reads
TweetG’day,
I had a recent conversation about data pages. There was some debate about the location of the first record on...
2012-08-06
1,214 reads
TweetG’day,
I’m extremely pleased that Microsoft are continuing their commitment to provide full DDL to preform TSQL operations that have previously been preformed using stored...
2012-04-22
1,342 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