snippet designate a certain time of the day in getdate()
Snippet to designate a certain time of the day to evaluate in the current day. If you need to limit a...
2013-04-23
361 reads
Snippet to designate a certain time of the day to evaluate in the current day. If you need to limit a...
2013-04-23
361 reads
In last week’s post, I talked about the steps required to backup a Azure SQL Database. That post leaves us...
2013-04-29 (first published: 2013-04-23)
6,668 reads
I don’t know if I would consider myself an industry expert, but hey, it says it on the Internet, so...
2013-04-23
1,012 reads
The Way, starring Martin Sheen and directed by Emilio Estevez has been on my want to watch list for a...
2013-04-23
678 reads
On Saturday, May 4, the Enterprise Developers Guild in Charlotte will hold their annual Carolina Code Camp. There's a number...
2013-04-23
886 reads
Hello Friends,
As discussed in my previous blog the new architecture of Service Application in 2010. Today I am here with...
2013-04-23
897 reads
Anyone working with SSIS and Excel probably had the following issue: you are creating an SSIS package using an Excel...
2013-04-25 (first published: 2013-04-23)
13,170 reads
To Read/Write/Rename/Copy/Delete a file configured across ‘N’ of servers in the same path, this script is going to be very...
2013-04-22
1,416 reads
1) Configure DBMail - In this case the ‘TEST’ profile being created for the demo
2) Create Table – TLOG_Metrics
3) Insert the dumnmy...
2013-04-22
1,657 reads
Yes, it does. However, let’s prove it. First let’s create a database, a table, and enter some data:
-- create a...
2013-04-26 (first published: 2013-04-22)
3,446 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