SQL Server 2012 Licensing VMs without SA
I ran across a blog talking about Microsoft licensing, and found it very interesting. I learned a few things, and...
2012-01-06
2,007 reads
I ran across a blog talking about Microsoft licensing, and found it very interesting. I learned a few things, and...
2012-01-06
2,007 reads
At some point last year after finishing the 31 Days of SSIS, I decided to bundle up all of the posts...
2012-01-09 (first published: 2012-01-05)
7,135 reads
As I mentioned in yesterday’s post, I had two sessions at the PASS Summit this past year in which I...
2012-01-05
751 reads
You may fire up the SharePoint 2010 Management Shell (which allows you to run PowerShell commands to do cool SharePoint...
2012-01-05
2,246 reads
Happy new year, SQL peeps! I hope everyone had a wonderful holiday. Last week was very quiet at work, but...
2012-01-05
3,372 reads
Today I’ll talk about the available JOIN operator types in SQL Server (Nested Loops, Hash and Merge Joins), their differences,...
2012-01-05
5,882 reads
This is a follow up post from a comment on my blog.
Earlier I posted about using xp_instance_regread to get default...
2012-01-10 (first published: 2012-01-05)
2,864 reads
I recently had to enable tokens in SQL Agent across about 50 instances. Unfortunately, enabling tokens requires a SQL Agent...
2012-01-05
1,773 reads
When developing reports in Reporting Services you will often use the built-in
expression language to make report data and formatting...
2012-01-12 (first published: 2012-01-05)
4,719 reads
To generate the ALTER INDEX..DISABLE and the ALTER INDEX..REBUILD statements for all nonclustered indexes for a single table use the...
2012-01-05
1,180 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