Edit (03-Apr-2017) Orchard has moved on a lot since this was written and as such it is somewhat out of date. I have removed the links to the example code, but left the blog here for prosperity When I started blogging last year, my first major decision was either to host my own site somewhere using a CMS type system […]
Read MoreThis is the last part of a 3 part blog which will attempt to show some different ways of how you can use the xml modify() method to update the contents of an XML document. This part, starting at the absolute basics, will cover the ability to delete data in an existing XML document XML DML is an extension of […]
Read MoreThis is the second part of a 3 part blog which will attempt to show some different ways of how you can use the xml modify() method to update the contents of an XML document. This part, starting at the absolute basics, will cover the ability to update data in an existing XML document XML DML is an extension of […]
Read MoreThis is the first part of a 3 part blog which will attempt to show some different ways of how you can use the xml modify() method to update the contents of an XML document. This first part, starting at the absolute basics, will cover the ability to insert data into an existing XML document XML DML is an extension […]
Read MoreYou can only use the position() function within an xquery predicate and can’t use it to return the position value of the node itself, which is a shame, but a couple of good workarounds have been published. However I had a requirement (don’t ask why!) to return the position() of the node as a value within the xml itself. My […]
Read MoreI’ve used SQL to generate countless blobs of xml over the years and one feature that I have come to rely heavily upon is the ability to easily build complex xml structures by using column aliases in conjunction with the FOR XML PATH clause in your query. Not only do they allow for speedy creation, they also make the query […]
Read MoreI know that this subject has been blogged about numerous times but I thought I’d post an alternative way of shredding a comma separated string to a table that I come up with today, albeit with help from the very clever Itzik Ban-Gan cross join nested CTE that many of us use to generate large tally tables quickly. For sure, […]
Read MoreDatabase users can become orphaned for a few reasons. For example, a database restore to another instance or deleting the corresponding SQL login would have the effect of leaving a database user orphaned. Development/testing SQL servers may also experience this due to the number of ad-hoc updates that may occur over the years. If you are unlucky enough your production […]
Read MoreI came across this really simple best practice from BOL for the xml method exist which when used will give you a much cleaner and faster query plan. If like me you commonly use the name of an element or attribute as part of an XQuery predicate, then you would benefit immediately from this. So lets create a table with […]
Read MoreIs all set to be officially known as SQL 2012 and will be finally released in……. 2012! Announced at the PASS Summit 2011, it is due to be released to manufactoring in the first half of next year. The other major announcement from PASS was Microsoft actively supporting the Hadoop project.
Read More