2013-02-13 (first published: 2013-01-25)
2,025 reads
2013-02-13 (first published: 2013-01-25)
2,025 reads
This utility will generate column and parameter metadata in various useful formats for tables, views, and procedures.
2013-02-12 (first published: 2013-01-18)
788 reads
Simple script which create a list of all the tables and rows of the selected DB.
2013-02-11 (first published: 2012-12-21)
1,191 reads
2013-02-08 (first published: 2012-12-27)
1,567 reads
T-SQL that allows you to import tab delimited text file into correct table based on file name.
2013-02-07 (first published: 2012-12-27)
2,354 reads
2013-02-06 (first published: 2012-12-27)
1,877 reads
Creates and populates a date-dimension table suitable for OLTP or data warehouse purposes.
2013-02-04
3,347 reads
Changes the database compatibility level of all databases to the given level.
2013-01-31 (first published: 2013-01-07)
960 reads
Database Users and their Corresponding Roles and type login.
2013-01-28 (first published: 2013-01-16)
2,136 reads
One of the new cool features in SQL 2012 is the SQL Server Availability groups. In other words being able to failover a group of databases which are logically connected. i.e. SharePoint databases. Well, it is also possible to do that in SQL 2008 (R2). It’s called a Grouped Failover.
2013-01-24 (first published: 2013-01-16)
612 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