Hi All,
I am running an sql statement on an Azure database. Results are returned back perfect as "QueryResult".
I can VIEW the correct results :

Next step is to write this result to a txt file. Output is perfect as comma separated values.
However when I change my SQL to include
FOR XML AUTO, ELEMENTS (which runs fine in SSMS by the way)
the QUERYRESULT View changes to :

Obviously the next step (save to file) throws an error because of "Type of value has a mismatch with column type. Expected type is Byte. Can I set the type of a QueryResult ?
Any advice or guidance would be appreciated.
Kris