Create SQL Server scripts with Visio 2010
If you are using Visio 2010 and creating tables via the Database Model Diagram template, you may be surprised to...
2011-12-07
2,340 reads
If you are using Visio 2010 and creating tables via the Database Model Diagram template, you may be surprised to...
2011-12-07
2,340 reads
The new year is just around the corner. And before you know it, we’ll have an opportunity to start moving...
2011-12-07
528 reads
PBM raises errors for policy violations. We can create alerts on those errors to be notified of policy violations. In...
2011-12-07
1,684 reads
My perception of the tablet market has been that the iPad is king, but at a kingly price. If I...
2011-12-07
804 reads
Part 1 of Question 13: The Question.Part 2 of Question 13: The follow up to the question.This is a continuation...
2011-12-07
624 reads
By Grant Fritchey
http://www.scarydba.com/
A DBA (Database Administrator) is a Data Professional tasked with managing an organization’s data using some sort of...
2011-12-07
2,277 reads
What is it that makes the perfect role for a Database Administrator?
Well I can’t tell you that because you and...
2011-12-07
1,313 reads
Latency is the time delay measure in the system. SQL Server can only be as fast as the slowest component...
2011-12-07
1,844 reads
Scott Hanselman has a great list of the power tools he uses for Windows and development. It’s worth a read,...
2011-12-06
1,806 reads
Resumes are like opinions, which are like something else: everybody’s got one. And if you don’t have one, then certain...
2011-12-06
3,163 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