Audit All Select Statements
Legislation and regulation sometimes dictates that certain activities must be tracked within a database. On occasion, it will be required...
2016-08-15 (first published: 2016-08-08)
2,583 reads
Legislation and regulation sometimes dictates that certain activities must be tracked within a database. On occasion, it will be required...
2016-08-15 (first published: 2016-08-08)
2,583 reads
Legislation and regulation sometimes dictates that certain activities must be tracked within a database. On occasion, it will be required that queries be audited and tracked to reach compliance...
2016-08-08
71 reads
We live in a day and age when security (data, network, server, etc) is seemingly at the forefront of the daily news.
Related Posts:
Cannot Open Backup Device January 1, 2020...
2016-08-05
10 reads
We live in a day and age when security (data, network, server, etc) is seemingly at the forefront of the...
2016-08-05
1,054 reads
It has been nearly a year since I started an extensive series about Extended Events. Previous to that start, I...
2016-08-04 (first published: 2016-08-01)
2,465 reads
Sharpen Something
Last week I sent out the invite for the August TSQL Tuesday blog party. In that invite I promised...
2016-08-04 (first published: 2016-08-02)
1,396 reads
This month I am asking you to not only write a post but to do a little homework - first. In other words, plan to do something, carry out...
2016-08-02
20 reads
Parsing XML is the epitome of salt in a wound for a DBA. Parsing the XML from Extended Events need not be so painful. Read further to discover how...
2016-08-01
32 reads
This month I am asking you to not only write a post but to do a little homework - first. In other words, plan to do something, carry out...
2016-07-27
9 reads
Sharpen Something
It has now been 30 months since the last time I hosted a TSQL Tuesday, that was TSQL Tuesday...
2016-07-27
923 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