On the get the job done front, my client had a question today that, while it makes me cringe a little to answer the way I did, it got him moving again. [Thanks to Mike Levy for pointing me in the right direction] My client has a small administrative utility that displays Things. Things can [...]
Archive for category SQL Server
STUFF & FOR XML PATH
Mar 2
Someone was looking to do quick-and-dirty validation of an Xml document inside a SQL Server procedure today. I assumed, and regretted, that he meant 2005, which would have looked like this: declare @xml1 xml declare @xml2 xml set @xml1 = ‘<Node1><Node2 attrib=”This is it.” /></Node1>’set @xml2 = ‘<Node1><Node2 /></Node1>’select Col.value(‘count(./@attrib)’, ‘int’) as countfrom @xml1.nodes(‘Node1/Node2′) as [...]