SQL Server – CTP is now available for SQL Server 2008 Service Pack 3
CTP has been made available earlier this week for SQL Server 2008 SP3 on Download Center. Read this MSDN blog...
2011-08-25
746 reads
CTP has been made available earlier this week for SQL Server 2008 SP3 on Download Center. Read this MSDN blog...
2011-08-25
746 reads
sp_help returns information about database objects and types.
@object_name argument is optional for sp_help. When executed without any argument it returns...
2011-08-24
2,508 reads
You can browse available SQL Instances on network by choosing "<Browse for More..>" from Server Name drop-down list in "Connect...
2011-08-23
2,131 reads
sys.dm_db_persisted_sku_features lists all features which are utilized by the database. Features specific to Enterprise/Developer edition are:
- Compression,
- Partitioning,
- TDE and...
2011-08-22
1,377 reads
PERCENT_RANK() returns the position of a row within the result set. In contrast to RANK() function, PERCENT_RANK() ranks rows between...
2011-08-19
1,065 reads
CUME_DIST() calculates relative position of a value relative to a group of values. The value returned by CUME_DIST() is > 0...
2011-08-18
682 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