[xquery-talk] Add value to result before a for loop
Martin Honnen
Martin.Honnen at gmx.de
Wed Jul 18 07:04:17 PDT 2012
Gary Larsen wrote:
> let $hdr := concat('Id', codepoints-to-string(9), 'Name',
> codepoints-to-string(10))
> let $body := for $i in $doc/item return
> concat($i/id, codepoints-to-string(9), $i/name, codepoints-to-string(10))
> return string-join($hdr, $body)
Michael had the right suggestion
return string-join(($hdr, $body), '')
where the first argument to string-join is the sequence
($hdr, $body)
and the second argument to separator string.
--
Martin Honnen --- MVP Data Platform Development
http://msmvps.com/blogs/martin_honnen/
More information about the talk
mailing list