DB2 Scalar functions - XMLCOMMENT


Volta a página anterior

Volta ao Menu das scalar functions

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

XMLCOMMENT

The XMLCOMMENT function returns an XML value with a single XQuery comment node with the input argument as the content.

XMLCOMMENT(string-expression )

The schema is SYSIBM.
The function name cannot be specified as a qualified name.

string-expression
An expression whose value has a character string type: CHAR, VARCHAR or CLOB.
The result of the string-expression is parsed to check for conformance to the requirements for an XML comment, as specified in the XML 1.0 rule.
The result of the string-expression must conform to the following regular expression:
   ((Char - '-') | ('-' (Char - '-')))*
where Char is defined as any Unicode character excluding surrogate blocks X'FFFE' and X'FFFF'.
Basically, the XML comment cannot contain two adjacent hyphens, and cannot end with a hyphen (SQLSTATE 2200S).

The data type of the result is XML.
If the result of string-expression can be null, the result can be null; if the input value is null, the result is the null value.

Related reference



© Copyright IBM Corp.