Xml Conversion "Type mismatch" Error
- by prema
I am selecting a query in sql server 2005
SELECT 'Region' AS ELEMENT,(SELECT GeographyName,GeoID from @tmpTable FOR XML RAW, TYPE) FOR XML RAW('Root')
This will give the output in xml as
<Root ELEMENT="Region">
<row GeographyName="East" GeoID="2" />
<row GeographyName="West" GeoID="3" />
<row GeographyName="North"…