Wyodrębnianie atrybutów z pól XML w tabeli SQL Server 2008

Mam tabelę z kilkoma kolumnami, z których jedna to axml kolumna. Nie mam przestrzeni nazw do użycia w zapytaniu. Dane XML mają zawsze taką samą strukturę dla wszystkich rekordów.

Dane wymyślone
create table #temp (id int, name varchar(32), xml_data xml)

insert into #temp values
(1, 'one',   '<data><info x="42" y="99">Red</info></data>'),
(2, 'two',   '<data><info x="27" y="72">Blue</info></data>'),
(3, 'three', '<data><info x="16" y="51">Green</info></data>'),
(4, 'four',  '<data><info x="12" y="37">Yellow</info></data>')
Pożądane wyniki
Name    Info.x   Info.y   Info
-----   -------  -------  -------
one       42       99     Red
two       27       72     Blue
three     16       51     Green
four      12       37     Yellow
Częściowo działa
select Name, xml_data.query('/data/info/.').value('.', 'varchar(10)') as [Info]
from   #temp

ZwracaName iInfo kolumny. Nie mogę dowiedzieć się, jak wyodrębnić wartości atrybutów bez użycia przestrzeni nazw. Na przykład następujące zapytania zwracają błędy:

Zapytanie 1
select Name, xml_data.query('/data/info/@x') as [Info]
from   #temp

Msg 2396, Level 16, State 1, Line 12
XQuery [#temp.xml_data.query()]: Attribute may not appear outside of an element
Zapytanie 2
select Name, xml_data.value('/data/info/@x', 'int') as [Info]
from   #temp

Msg 2389, Level 16, State 1, Line 12
XQuery [#temp.xml_data.value()]: 'value()' requires a singleton (or empty sequence), found operand of type 'xdt:untypedAtomic *'
Zapytanie 3
select Name, xml_data.query('/data/info/.').value('@x', 'int') as [Info]
from   #temp

Msg 2390, Level 16, State 1, Line 9
XQuery [value()]: Top-level attribute nodes are not supported
Pytanie

Jak napisać zapytanie, aby zwrócić zwykłe dane kolumny i wartości atrybutów elementu + zxml kolumna w tej samej tabeli?

questionAnswers(1)

yourAnswerToTheQuestion