2010-09-08 (first published: 2010-09-02)
2,392 reads
2010-09-08 (first published: 2010-09-02)
2,392 reads
Do you need to take your mind off of the SQL mess you are dealing with? Try my funny words generator.
2010-09-03 (first published: 2010-08-27)
2,685 reads
This script changes the collation of columns to default database collation in all the tables
2010-09-02 (first published: 2010-09-01)
2,211 reads
A script to reveal which logins have access to your sql server via windows groups.
2010-09-01 (first published: 2010-08-26)
2,461 reads
Generates scripts to make text, ntext, varchar and char columns nvarchar/nchar
2010-08-30 (first published: 2010-08-26)
1,353 reads
2010-08-27 (first published: 2010-08-25)
3,713 reads
After scouring the site, and googling until my fingers bled, I finally put together a function that will return the dates when daylight savings time began/ended since at least 1990.
2010-08-26 (first published: 2010-08-19)
2,031 reads
Summary information and metrics for any column in a given Table/View. Metrics include: number of records, distinct records, nulls, min, max, std, quartiles, kurtosis, skew, etc.
2010-08-24
72 reads
Fill a small Tally table with a 1 column primary key using GO keyword to repeat an insert.
2010-08-18 (first published: 2010-08-16)
1,569 reads
2010-08-16 (first published: 2010-03-05)
3,893 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