So I have an XQuery that looks something like this:
for $i in /*:rootElement
where $i/*:field = "test"
return $i
This query returns a lot of results, but I only really need one. How can I return just the first item in the result sequence?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On a side note, a better way to write this is to use step predicates: