Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

SQL Server Rocks!

SQL Database Administrator/Developer. Background in developing OLTP/document based databases, SQLXML and performance tuning with an unhealthy fascination for the SQL query optimiser!

Archives: December 2011

Retrieving position() value of node by using XQuery alone

You 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()… Read more

0 comments, 2,420 reads

Posted in SQL Server Rocks! on 28 December 2011

FOR XML PATH using node tests in column aliases

I'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… Read more

0 comments, 3,560 reads

Posted in SQL Server Rocks! on 15 December 2011