Len() and DataLength()
Both system functions, Len() and DataLength(), in SQL Server are used to measure the length of the data. The main...
2013-05-16
1,327 reads
Both system functions, Len() and DataLength(), in SQL Server are used to measure the length of the data. The main...
2013-05-16
1,327 reads
This is just a quick tip to help with folks who present SQL code at events such as SQL Saturday....
2013-05-16
844 reads
How many lines of TSQL codes and Window Functions you need to come up with this?
With R, it takes about...
2013-05-16
913 reads
If you work at a company with more than a 100 or so employees you probably get an email every...
2013-05-16
637 reads
I shifted to Reader about a year ago mainly for the ability to access my feeds on multiple devices. I’ll...
2013-05-16
643 reads
sys.dm_tran_database_transactions DMV (Dynamic Management View), described by BOL as follows: http://msdn.microsoft.com/en-us/library/ms186957.aspx
Returns information about transactions at the database level.
Some time , T-log...
2013-05-16
2,015 reads
I have always been a big fan of Xp_readerrorlog. The simple reason is that it much faster to read errorlog...
2013-05-16
1,701 reads
Ever jump on a machine to connect to a SQL Server and find out… whoops! No tools. For some reason,...
2013-05-15
961 reads
We are planning to take SSAS cube database backup since our backup tool does full file system backup in case...
2013-05-15
10,884 reads
Someone suggested Newsblur to me, and I went to their home page. Like many sites, it asks you to sign...
2013-05-15
829 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...
Nitazoxanide 500 mg Buy Online is a search term used by people looking for...
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...
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