gregs

helping me remember what I figure out

August 29, 2007
by gregs
0 comments

SQL to XML

Just came across this neat trick that uses SQL to generate XML on the fly: PLAIN TEXT CODE: DECLARE @x xml SET @x=(select geoAreaCode , geoLevelCode , geoLevelId , geoAreaId from tbl_geoLevel where uuid = for xml raw('geoArea'), root('geoAreas'), type) … Continue reading