Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » DML   (RSS)

Silent XQuery failures

A newsgroup post I read earlier today reminded me that there are cases where failure to get the expected result when using XQuery can sometimes be difficult to diagnose. Here’s what the poster was doing declare @xml xml set @xml = '<root><test></test></root>'

Mixed content (part 3)

It’s been a few weeks since my last post about mixed content so let’s pick up right where we left off. This time we will look at DML operations on mixed content. We’ll keep using the XML schema as well as the table I created in the first post of this
Posted by denisruc | 1 Comments
Filed under: , ,

xsi:nil magic (part 2/2)

Last time we looked at what happens to the xsi:nil attributes when replacing the value of a simply typed element. In this post, we’re going to look at complex types. First let’s create a schema collection with complex types and elements. CREATE XML SCHEMA
Posted by denisruc | 0 Comments
Filed under: ,

xsi:nil magic (part 1/2)

A few months ago I wrote a post about the interesting behavior of the xsi:type attribute . Today we’re going to look at his no so distant relative xsi:nil. But first let’s do a quick recap. Any element can be made nillable by adding the attribute nillable=”true”
Posted by denisruc | 1 Comments
Filed under: ,

About my article in SQL Server Standard Magazine

In my previous post I mentioned the article I wrote for the September issue of SQL Server Standard Magazine. I heard of one person who was having trouble running the code samples from the article. When I received my copy of the magazine I realized the
Posted by denisruc | 0 Comments
Filed under:

xsi:type magic

As I said in my previous post, the past few weeks have been demanding and I had little time to spend on blog post. However I recently rediscovered an interesting behavior in typed XML DML and I felt I should make some time for a quick post. Today’s post
Posted by denisruc | 3 Comments
Filed under: ,

Inserting an XML instance into another even though SQL type ‘xml’ is not supported in XQuery.

Since we shipped SQL Server 2005 I have seen a few users ask if there was a simple way to insert an XML instance into another one. For simplicity’s sake, in the rest of this post I’m going to assume that all my variables contain valid XML documents (a
Posted by denisruc | 25 Comments
Filed under:

Restricting the contents of a typed XML column using triggers

A typed XML column/variable is constrained by a schema collection. That means only instances that can be validated against the schemas in the collection will be accepted. You can tighten the rules a little bit with the use of the DOCUMENT facet, which
Posted by denisruc | 0 Comments
Filed under: ,

DML operations on multiple nodes

If you've been playing with SQL Server 2005's implementation of XQuery for a while you probably know that "delete" is the only operation that allows for multiple target nodes. For example, let's imagine that we have the following table CREATE TABLE mySchemas
Posted by denisruc | 2 Comments
Filed under: ,
 
Page view tracker