Backup database in CMS
Sometime you know the database name which you want to backup, but you don't know which server it is on....
2012-05-09
1,129 reads
Sometime you know the database name which you want to backup, but you don't know which server it is on....
2012-05-09
1,129 reads
I wrote a store procedure which could generate restore script automatically by backup history table. it can help you select...
2012-04-30
7,009 reads
SQL Server has multiple high availability solutions. Comparing with cluster, database mirroring and logshipping are easier to setup, and they...
2012-04-25 (first published: 2012-04-21)
12,445 reads
When I troulbshooting the logshipping problem, I found many logshipping store procedure can not be found in the master or...
2012-04-19
1,040 reads
Last week, our log shipping setup had a problem, so I spent some time to dig into the log shipping....
2012-04-18
2,648 reads
Recently, I installed sql server 2012 on windows 7 laptop, today when I wanted to login sql server with TCP/IP, I got...
2012-04-10
6,429 reads
Today I need to shrink a big data file, I know shrink file is not a best practise, and it...
2012-04-07
2,415 reads
I lives alone, usually, I clean my small apartment at every weekend, wipe the table/firniture with cloth, clean the capet...
2012-04-06
26,963 reads
Not sure if it is a good news or bad news, SQL Server 2012 license shifts from processor-based to core-based.......here...
2012-04-05
1,954 reads
After installing the SQL Server 2012 on my laptop, I found there is only online document available, no local book...
2012-04-01
26,008 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