2018-11-19
5 reads
2018-11-19
5 reads
2018-11-19
16 reads
Looking to import SQL Server database from one server to another ? Confused how to copy from one to another or...
2018-10-05
1,838 reads
Hi Friends,
This blog is now transferring to different hosting server. So you may got some issue in accessing it. Sorry...
2018-04-10
278 reads
Hi Friends,This blog is now transferring to different hosting server. So you may got some issue in accessing it. Sorry for the inconvenience caused
2018-04-10
24 reads
Sometimes we need a SQL Script which can gives the below information about the databases created on a SQL Server...
2018-03-30
9,765 reads
Sometimes we need a SQL Script which can gives the below information about the databases created on a SQL Server for house keeping purpose: -1) Database Name2) Database ID3)...
2018-03-30
19 reads
Sometime we need to find out the history of database restoration to get the answers of following questions: -
1) Do...
2018-03-30
8,171 reads
Sometime we need to find out the history of database restoration to get the answers of following questions: -1) Do we need to restore the database again as there...
2018-03-30
21 reads
Sometime we create databases on Test/ Development database servers for temporary uses for short duration and forgot to delete them...
2018-03-29
1,928 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