XML Context node

0

Please login or register to vote for this query.

(click on this box to dismiss)

Esperanto Language

Q&A for teachers and students of the Esperanto language

declare @X xml = '
<Notes>
  <Note>
    <Text>1</Text>
  </Note>
  <Note>
    <Text>2</Text>
  </Note>
  <Note>
    <Text>3</Text>
  </Note>
</Notes>';

select T.X.value('(./Text)[1]','varchar(500)'),
       T.X.value('(/Notes/Note/Text)[1]','varchar(500)')
from @X.nodes('/Notes/Note') as T(X);

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results