|
|
-
|
|
We had seen an example that demonstrated how to delete an attribute from an XML variable. Let us now try to delete an element from an XML document/variable. Here is the sample XML document for this lab. <sp......
|
|
-
|
|
I had recently started a series of blog posts on XQuery which presented a series of short examples demonstrating various XQuery features. The goal of the series is to present a set of commonly used examples that explain the usage of XQuery in SQL Server. While the XQuery Labs is still progr......
|
|
-
|
|
In the previous labs, we have seen several examples of inserting/updating/deleting attributes. The syntax for updating the values of elements is slightly different from that of attributes. Let us see an example to understand this. <</sp......
|
|
-
|
|
In Lab 15, we saw how to modify an attribute based on the value of a variable. We used the value of a variable to locate the correct element. We located the element having a specific attribute with the value specified in a variable. Now let us look at a bit more complex example. Assume a ca......
|
|
-
|
|
Earlier in XQuery lab, we have seen how to modify the value of an attribute. So it is easy when we know which element to update and which attribute to modify. Let us look at a slightly different example. Assume that we need to modify a given attribute of a node. We need to identify the corre......
|
|
-
|
|
In one of the previous labs, we saw an example that select specific nodes by applying a filter on the value of an attribute. Some times, it can happen that you need to apply filters on more than one attribute to retrieve a set of nodes matching a given criteria. This post shows an exam......
|
|
-
|
|
When you write a simple FOR XML query with PATH, you will see that a element will be generated for each row in the result set. For example: DECLARE @t TABLE (Name VARCHAR(10))INSERT INTO @t (Name) SELECT 'Jacob'INSERT INTO @t (Name) S......
|
|
-
|
|
We have seen several example of reading values from XML variables, in the previous labs. Most of these posts are based on the examples I write for helping people at MSDN forums. Some times, you might find more than one post that shows reading values from an XML variable, but presenting diffe......
|
|
-
|
|
Usually the RECEIVE command reads messages from the specified queue and removes those messages from the queue. This is what I have always seen. I found a post in the Service Broker forum which says that the messages are not removed from the queue after the RECEIVE command is executed. The only reaso......
|
|
-
|
|
One of the questions that I had in my mind, when I started working with service broker is about the safety of my messages. Service broker is a reliable messaging platform. It is capable of delivering the message to the target without fail. But what if the target received the message but could not pr......
|
|