BrianAnneot
New Member
I have a XML string that looks like \[code\] <PLATFORM> <PLATFORMNAME>UNIX</PLATFORMNAME> <OS>Ipad</OS> <VERSION>5.1</VERSION> <PLATFORMNAME>Windows</PLATFORMNAME> <OS>Windows</OS> <VERSION>2008 (64bit)</VERSION> </PLATFORM>\[/code\]Which I need to insert into a temptable\[code\] Create Table #TempXMLTable ( PlatformName NVARCHAR(50), OS NVARCHAR(50), PlatformVersion NVARCHAR(50) ) INSERT INTO #TempXMLTable VALUES( @XML.value('(/PLATFORM/PLATFORMNAME)[1]', 'nvarchar(MAX)'), @XML.value('(/PLATFORM/OS)[1]', 'nvarchar(MAX)') , @XML.value('(/PLATFORM/VERSION)[1]', 'nvarchar(MAX)'))\[/code\]When I do the above insert only the first column is inserted but I want both insertsShould look like - \[code\] PlatformName OS Version Unix Ipad 5.1 Windows Windows 2008\[/code\]