concat returns the string concatenation of the argument values. It has zero or more parameters.
concat(string-parameter [,string-parameter]...)
concat can return multiple elements in a single call of xmlextract. For example, the following query returns both first-name and last-name elements:
select xmlextract('//author/concat(first-name, last-name)', text_doc) from sample_dcs where name_doc='bookstore' ----------------------------------------- JoeBobMaryBobToniBob
You can also use concat to format and punctuate results. For example:
select xmlextract ('//author/concat(",first(",first-name, ")-last(",last-name, ") ")' , text_doc) from sample_docs where name_doc='bookstore' ---------------------------------------------- first(Joe)-last(Bob) first(Mary)-last(Bob) first(Toni)-last(Bob)
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |