2009-11-17 (first published: 2009-11-06)
1,014 reads
2009-11-17 (first published: 2009-11-06)
1,014 reads
This procedure searches for your criteria not only in code, but also in objectnames
2009-11-16 (first published: 2009-10-20)
1,114 reads
Returns records with errors from the default trace ordered by most recent first
2009-11-12 (first published: 2009-10-29)
713 reads
This procedure checks if a mirror treshold exists and wait until this treshold is cleared or after a specified time.
2009-11-10 (first published: 2009-10-23)
511 reads
A useful SQL function to parse a single string with delimited values for the "N"th occurrence
2009-11-06 (first published: 2009-10-15)
1,468 reads
There are times when maintenance plan is too simple to do the job, and SSIS is unreachable for you. Here is a simple stored procedure to help you.
2009-11-05 (first published: 2009-10-09)
1,564 reads
Retrieve consecutive records from the table based the value difference
2009-11-04 (first published: 2009-10-06)
965 reads
2009-11-03 (first published: 2009-10-06)
1,964 reads
This will generate a rollback procedure for any table with CDC enabled for all columns
2009-11-02 (first published: 2009-10-08)
1,079 reads
In development enviornment we always get the modifications in tables from developers.As far as my concern writing scripts is tedious work for us. I hope below script will help you.
2009-10-30 (first published: 2009-10-01)
1,382 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