Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
The JOINLINES function joins the values of two or more text expressions into a single multiline value. When multiline text values are joined, all the lines of the first expression appear first, followed by all the lines of the second expression, and so forth. Normally the arguments for JOINLINES are text values, but they can have other data types.
Return Value
TEXT or NTEXT
This function accepts TEXT values and NTEXT values as arguments. The data type of the return value depends on the data type of the values specified for the arguments:
When all arguments are TEXT values, the return value is TEXT.
When all arguments are NTEXT values, the return value is NTEXT.
When the arguments include both TEXT and NTEXT values, the function converts all TEXT values to NTEXT before performing the function operation, and the return value is NTEXT.
Syntax
JOINLINES(first-expression next-expression...)
Arguments
An expression to which JOINLINES adds next-expression. When the expression has a data type other than TEXT or NTEXT, JOINLINES converts it to TEXT. See "Converting Expressions That Are not TEXT or NTEXT".
One or more expressions to join with first-expression. When an expression you want to concatenate has a data type other than TEXT, JOINLINES converts it to TEXT. See "Converting Expressions That Are not TEXT or NTEXT".
Notes
When the data type of an expression is not TEXT or NTEXT, JOINLINES automatically converts its value to TEXT before concatenating it with the other values. So when you put a number in a JOINLINES function, the number is automatically converted to TEXT and no extra step is need to accomplish this. The format of the result depends on the settings of the COMMAS and DECIMALS options.
JOINLINES ignores any arguments that have a value of NA
.
Examples
Example 15-28 Joining the Lines of Two Text Expressions
This example shows how to make a new list by adding the value Regions
to the end of a variable called mktglist
.
mktglist
has the following initial values.
Salespeople Products Services
The statement
newlist = JOINLINES(mktglist 'Regions')
assigns the following to newlist
.
Salespeople Products Services Regions