Jacob Sebastian shows how to validate an XML Document in T-SQL with XSD. An XML Schema Collection checks the structure and values of an XML column or variable.
SQL SERVER – Size of Index Table for Each Index – Solution
Two reader solutions to my puzzle: queries that show the size of the index table for each index, accurate in nearly all of my tests.
DATEDIFF_BIG: Count Long Intervals Without int Overflow
DATEDIFF_BIG returns bigint boundary counts. Compare a long seconds interval, reversed dates and a tiny boundary crossing without overflowing int.
SQL SERVER – Comma Separated Values (CSV) from Table Column
The script I use most often to build Comma Separated Values (CSV) from a table column with FOR XML PATH. I think XML is the best option for code and speed.
SQL SERVER – Interesting Observation – TOP 100 PERCENT and ORDER BY
ORDER BY in a view raises Msg 1033 unless TOP is used, so many developers add TOP 100 PERCENT. An interesting observation on what that really does.
SQL SERVER – Understanding Table Hints with Examples
What are hints in SQL Server and when should you use them? Understanding table hints with examples, plus a word of caution about overriding the optimizer.







