0

I have selected XML data (TEXT column type) from MySQL using:

SELECT HEX(CONVERT(column USING utf16le)) FROM table

How can I get data back to XML in SQL server (now stored in NVARCHAR field)?

1

1 Answer 1

0

Right answer is to use this in SQL server:

CAST(
CONVERT(varbinary(MAX), column, 2) 
as nvarchar(max))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.