Home Forums SQL Server 2005 T-SQL (SS2K5) SQL to extract Data from XML string stored in nvarchar column RE: SQL to extract Data from XML string stored in nvarchar column

  • declare @XML as xml

    set @XML = '<?xml version=''1.0'' encoding=''UTF-8''?><root available-locales="en_GB" default-locale="en_GB"><Title language-id="en_GB">Cookies</Title></root>'

    select @XML.value('(root/Title)[1]', 'varchar(50)')

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.