normalize-space  Parenthesized expressions

Chapter 2: XML Services

concat

Description

concat returns the string concatenation of the argument values. It has zero or more parameters.

Syntax

concat(string-parameter [,string-parameter]...)

Examples

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. Parenthesized expressions

View this book as PDF