MAXDOP and Tempdb – SQL 2016
Starting SQL Server 2016 Max Degree of Parallellism (Max DOP) Macrosoft has made hanges on this and now we can set it at database level. This helps for replication...
2019-11-09
196 reads
Starting SQL Server 2016 Max Degree of Parallellism (Max DOP) Macrosoft has made hanges on this and now we can set it at database level. This helps for replication...
2019-11-09
196 reads
Yes, Finally SQL Server 2019 is Generally Available yesterday Nov 4th 2019. It has many great features great videos: https://channel9.msdn.com/Niners/dutchdatadude https://cloudblogs.microsoft.com/sqlserver/2019/11/04/gain-intelligence-over-data-with-sql-server-2019-now-generally-available/ https://cloudblogs.microsoft.com/sqlserver/2019/11/04/sql-server-2019-is-now-generally-available/
2019-11-05
100 reads
another great new feature for SQL Server 2017 is a smart backup with dmv sys.dm_db_log_space_usage this DMV provide log usage information using this we can plan to initiate the...
2019-11-05
39 reads
continue on whats new SQL Server 2017 their is a great feature call resumable online index, means online index now has an option to PAUSE and RESUME or ABORT...
2019-11-04
157 reads
Hey, I realize that future we need to know Database system, No SQL and Big Data. with that as things are moving to machine learning and AI system which...
2019-11-02
35 reads
When I blog to configure Read only replica. it would require to provide read-only URL information, and provide the replica sequence. but their is no easy way to remove...
2019-10-30
40 reads
This is very important error whenever you see this error it is clear that your database has “TLOG FILE FULL” and this could result into maintenance job failed or...
2019-10-30
39 reads
sometime we observed that errorlog recycle is failed this happens when we monitor/read errorlog using our monitoring tool or monitoring application/scripts during this task if we want to recycle...
2019-10-29
37 reads
Read only replica is a great concept where we can re-direct all the read only connections to that replica. Following are some of the great articles for it....
2019-10-25
135 reads
msdb is growing due to queue. their is a great blog to help to reduce this How to reduce MSDB size from 42Gb to 200Mb query to get object...
2019-09-12
56 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