SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stairway to XML: Level 6 - Inserting Data into an XML Instance


Stairway to XML: Level 6 - Inserting Data into an XML Instance

Author
Message
rhsheldon
rhsheldon
SSC-Enthusiastic
SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)

Group: General Forum Members
Points: 100 Visits: 195
Comments posted to this topic are about the item Stairway to XML: Level 6 - Inserting Data into an XML Instance
james.ingram
james.ingram
SSC Rookie
SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)

Group: General Forum Members
Points: 43 Visits: 11
Thanks for a great sequence, Rob! I had no idea this capability was in SQL until a fellow programmer pointed out SQLServerCentral.com to me. My question: I realize that a series like this uses simplistic examples out of necessity, but it seems like querying and modifying XML data relies a lot on prior knowledge of the XML content. For instance, whether or not to use "as first"/"as last" depends on whether any children exist in the node in the first place. If "as first" is used, and there are no children in the node, does it break execution? It seems to me that in practice it would be much more common to add books to the booklist "as last" whether there are any extant books in the list or not, especially if developing a stored proc that receives the Person id as a parameter. Or is it necessary to do querying first to determine the number of books already in the list, and then code two methods, one with "as last" and one without "as last"?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search