I have the following XML:
<tests>
<test>1</test>
<test>2</test>
<test>3</test>
</tests>
And I am trying the following query:
CREATE PROCEDURE [dbo].[test]
@Tests xml=null
AS
BEGIN
SELECT
doc.col.value('(test)[1]', 'nvarchar(50)')
FROM
@Tests.nodes('//tests') AS doc(col)
END
But it only returns me a value from the first
What am I missing here?