SQL-J Language Reference,
Page 65 of 118


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

Concatenation

The concatenation operator, ||, concatenates its right operand to the end of its left operand. It operates on a character or bit expression.

Because all built-in data types are implicitly converted to strings, this function can act on all built-in data types.

Syntax

{
    { CharacterExpression || CharacterExpression } |
    { BitExpression || BitExpression }
}

For character strings, if both the left and right operands are of type CHAR, the resulting type is CHAR; otherwise, it is VARCHAR. The normal blank padding/trimming rules for CHAR and VARCHAR apply to the result of this operator.

The length of the resulting string is the sum of the lengths of both operands.

For bit strings, if both the left and the right operands are of type BIT, the resulting type is BIT; otherwise, it is BIT VARYING.

Example

--returns 'supercalifragilisticexbealidocious(sp?)'
'supercalifragilistic' || 'exbealidocious' || '(sp?)'
X'ba' || B'10101101' --returns X'baad'
VALUES null || 'AString' -- returns null
VALUES 130 || 'asdf' -- returns '130asdf'
[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.