Being Right, the Other Side
I read an excellent article by Camille Fournier about the importance of recognizing that being right is not the only...
2012-08-15
848 reads
I read an excellent article by Camille Fournier about the importance of recognizing that being right is not the only...
2012-08-15
848 reads
If you’re moving to a fully-fledged SQL database as part of Azure you may never even touch SQL Server Management...
2012-08-10 (first published: 2012-08-01)
2,737 reads
Wow!
How’s that for a recap?
The concept for the SQL in the City events is pretty simple. Put on a free...
2012-07-17 (first published: 2012-07-16)
2,090 reads
Good question. I don’t have a clue. So let’s set up a test. I’ll create this stored procedure:
CREATE PROCEDURE DL2e
...
2012-07-03 (first published: 2012-06-25)
2,274 reads
One of the great things about the Dynamic Management Objects (DMOs) that expose the information in plan cache is that,...
2012-07-02
1,504 reads
I can’t help it. I get really terribly excited when I publish a book. Maybe it should be old hat....
2012-06-27
1,611 reads
First off, I apologize. As if writing a book wasn’t hard enough, now we get new problems because of on-demand...
2012-06-26
836 reads
I sure hope you’re planning on attending the PASS Summit this year. If you’re not, you might want to reconsider....
2012-06-19
792 reads
For some reason, which isn’t completely clear to me, we’re voting for part of the members of the Nomination Committee...
2012-06-13
815 reads
While presenting this weekend at SQL Saturday #117 in Columbus, OH (great event, if you missed it, you missed it),...
2012-06-07 (first published: 2012-06-04)
3,338 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