2008-03-19 (first published: 2008-01-24)
3,594 reads
2008-03-19 (first published: 2008-01-24)
3,594 reads
This procedure prepares a query for generating permutations of n-numbers set and executes it.
2008-03-18 (first published: 2008-02-04)
1,025 reads
2008-03-14 (first published: 2008-01-29)
1,291 reads
Reformats the text output of queries to trim trailing blanks in wide varchar columns for easy copy-and-paste.
2008-03-10 (first published: 2008-01-09)
2,963 reads
This procedure searches for the specified GUID (or its part) in all (or selected one) databases
2008-03-06 (first published: 2008-01-24)
1,002 reads
This procedure displays amount of disk space used by database per directories.
2008-02-29 (first published: 2008-01-14)
947 reads
This procedure generates a list of random varchars (8 charactes length, only letters - lower or upper case).
2008-02-28 (first published: 2008-01-14)
684 reads
2008-02-27 (first published: 2008-01-21)
1,074 reads
2008-02-25 (first published: 2008-01-15)
944 reads
These examples show how You can circumvent the problem with not working TOP 100 PERCENT and ORDER BY in views.
2008-02-22 (first published: 2008-01-22)
1,332 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