.Net Logics
Pages
Home
About Us
Monday, 28 January 2013
ms sql xml data type convert to text
A simple cast will suffice:
select
cast
(
XMLCol
as
nvarchar
(
max
))
as
XMLCol
Or for non-unicode:
select
cast
(
XMLCol
as
varchar
(
max
))
as
XMLCol
You can't convert explicitly to a 'text' data type.
Try using 'varchar(max)' instead of 'text'
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment