Skip Headers
Oracle® OLAP DML Reference
11g Release 2 (11.2)

Part Number E17122-07
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

JOINBYTES

The JOINBYTES function joins two or more text values as a single line.

JOINBYTES ignores any arguments that have a value of NA and removes line breaks from the text it joins. (To preserve the breaks in a multiline text expression, use the INSCHARS.) Also, when the length of the joined line exceeds 4,000 (The maximum length of a joined line), JOINBYTES automatically breaks the line and puts the remaining bytes on the next line. The line break could occur between the two bytes of a double-byte character. JOINBYTES would then end one line with the first byte of the double-byte character and start the next line with the second byte of the character.

Return Value

TEXT

Syntax

JOINBYTES(first-expressionnext-expression...)

Parameters

first-expression

An expression to which JOINBYTES joins next-expression. When the first-expression has a data type other than TEXT or NTEXT, JOINBYTES converts it to TEXT. Use the CONVERT or TO_CHAR function to convert a NTEXT expression to TEXT.

next-expression

One or more expressions to join with first-expression. When an expression you want to concatenate has a data type other than TEXT or NTEXT, JOINBYTES converts it to TEXT. Use the CONVERT or TO_CHAR function to convert a NTEXT expression to TEXT.

Examples

Example 7-135 Using JOINBYTES to Concatenate Values

This example shows how you can use JOINBYTES to combine text with the current values of the two variables name.product and price. The variable price has a data type of DECIMAL; however, JOINBYTES automatically converts its value to TEXT to join it with the other text values.

LIMIT product TO 'Canoes'
LIMIT month TO 'Dec96'

The JOINBYTES function

JOINBYTES('Current Price for ' name.product ' is:  $' price)

returns the following value.

Current Price for Aluminum Canoes is:  $200.03