Find representatives of circilar references in T-SQL

If you deal with a table that has foreign key to itself, circular references may appear. The query that lists all rows with circular references is listed at the page. Sometimes it is necessary to list only representatives of each set of circular referenced rows. In the following query the first select statement orders representatives… Read More Find representatives of circilar references in T-SQL

Исправление XML схемы в SQL Server

В SQL Server 2008 есть очень полезный тип XML. C помощью команды CREATE XML SCHEMA COLLECTION [XML_схема] AS … можно создать xml схему, и использовать тип XML(DOCUMENT [XML_схема]) для формирования “правильных” значений xml. Однако, xml схему уже нельзя изменить, если она используется; например, существует поле таблицы, параметр процедуры или функции созданного типа. В этом случае… Read More Исправление XML схемы в SQL Server