Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 convert to text

Author  Topic 

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-05-15 : 00:23:43
how can i convert as below data to text?
Is this in HTML?

DetailColumn
<DESC v="hello"/><Dcc::Applicable v="False"/>

Result to text: hello

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-15 : 00:28:02
looks like xml to me as i cant see any standard html tags.
You can make use of XML functions for this

like for ex


DECLARE @x xml
SET @x = '<Root><DESC v="hello"/><Dcc::Applicable v="False"/></Root>'

SELECT t.u.value('@v','varchar(10)') AS vvalue
FROM @x.nodes('/Root/DESC') t(u)


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -