sp_executesql, Parameters and Parameter Sniffing
I’m honestly not crazy about dynamic T-SQL within stored procedures. There are just a few too many opportunities to mess...
2013-09-05
1,544 reads
I’m honestly not crazy about dynamic T-SQL within stored procedures. There are just a few too many opportunities to mess...
2013-09-05
1,544 reads
But then, the capabilities in Azure are always expanding. Here’s the new stuff that was just released in a blog...
2013-09-04
637 reads
I really like my Windows Phone. Yes, there are not as many apps as on a Droid or iPhone. But...
2013-09-03
548 reads
It was pointed out to me that since PASS is such a huge networking event, any employer would be crazy...
2013-09-02 (first published: 2013-08-26)
1,966 reads
Women, for the entire male half of the population, I apologize.
Those who know me well recognize, pretty easily, that I...
2013-08-30
1,789 reads
When I present on Windows Azure SQL Database, one of the biggest concerns comes up around throttling. Just the concept...
2013-08-29
1,538 reads
I am excited to be able to tell you about an all day seminar that I’ll be putting on prior...
2013-08-28
652 reads
It is absolutely not cool or fun to pay money to learn new technology. One of the main complaints people...
2013-08-27
790 reads
Learning new things can be daunting. First, you have to come up with the spare time. Then you have track...
2013-08-27 (first published: 2013-08-22)
2,442 reads
This book shows how to use of mixture of home-grown scripts, native SQL Server tools,
and tools from the Red Gate SQL Toolbelt, to successfully develop database applications in a team environment,
and make database development as similar as possible to "normal" development.
2013-08-26
4,785 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