SQL Server – Add Date/Time to output file of BCP / SQLCMD
You can export data from SQL Server using BCP command for SQLCMD utility. However, these utilities does not support dynamic...
2013-04-17 (first published: 2013-04-09)
3,608 reads
You can export data from SQL Server using BCP command for SQLCMD utility. However, these utilities does not support dynamic...
2013-04-17 (first published: 2013-04-09)
3,608 reads
Introduction
Recently, I was asked to develop a SSRS based report for the Event Management module in MS Dynamics CRM 2011....
2013-04-09
1,155 reads
Before we dive in to the post, I’d like to give a big thank you to Bob Pusateri (Blog|Twitter) for...
2013-04-09
793 reads
For this month's T-SQL Tuesday, Bob challenges us to discuss how we came to love presenting. Here's my story.
I developed a...
2013-04-19 (first published: 2013-04-09)
1,968 reads
Some Tuesday mornings I have bacon with eggs and an English muffin. Not today though. I am blogging about Why...
2013-04-09
467 reads
With Service Packs and Cumulative Updates rapidly released for SQL, it can be hard to keep up with what version you have installed where. It’s easy enough to find...
2013-04-09
21 reads
I see this question in one form or another a lot. I’ve seen this or something like it probably half...
2013-04-08
808 reads
I had known that the Resource Governor is always running in modern versions of SQL Server. It’s core to the...
2013-04-08
1,121 reads
This past weekend, I took a quick trek into the land of beer and cheese for the second annual Madison...
2013-04-08
603 reads
The PASS Business Analytics Conference is almost here! Check out the sessions to be presented at the conference and you will see...
2013-04-08
931 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