Script SQL Table Schema as XML-XSD
When creating XML messages for Service Broker or other applications use this simple method to build a validation XSD.
2009-10-28 (first published: 2009-10-06)
1,567 reads
When creating XML messages for Service Broker or other applications use this simple method to build a validation XSD.
2009-10-28 (first published: 2009-10-06)
1,567 reads
Reports summaries, in 3 levels of detail, connections, running requests, open transactions + cursors, and blocking. Provides query text + plan for the piggiest running request of each group.
2009-10-22 (first published: 2008-09-18)
6,106 reads
2009-10-21 (first published: 2009-10-01)
2,330 reads
Searches for tables who's names contain the search string. Gives Aggregate Size, Rows, Index, and Column information as well.
2009-10-20 (first published: 2008-11-04)
945 reads
Searches for columns with names containing @Colname that belong to tables with names containing @TableName or schemas with names containing @SchemaName. Gives size and rowcount for tables.
2009-10-16 (first published: 2008-08-01)
1,541 reads
Searches for foreign key constraints that don't have fully matching indexes. The best partial matching indexes are outputted with MatchCounts and column comparisons.
2009-10-15 (first published: 2009-10-01)
1,959 reads
Searches for tables who's names contain the search string. Gives Size and Rows information as well.
2009-10-14 (first published: 2008-08-01)
2,303 reads
Searches for actual and potential foreign key columns for a given primary key reference.
2009-10-12 (first published: 2008-06-20)
2,554 reads
2009-10-09 (first published: 2009-09-29)
2,110 reads
Searches precompiled procedures for the provided search string, optionally limiting to names matching a 2nd search string.
2009-10-08 (first published: 2008-06-20)
1,925 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