This is an old revision of the document!


DRAFT

Omnidex SQL Function: CASE

Description

The concatenation operator - || (two vertical bars) returns a single concatenated character string made up of two or more character strings. A concatenation operator on two character strings (CHAR_col2 || CHAR_col2) will return a CHAR string; everything else will return a C STRING.

All blanks are preserved during concatenation. Use the TRIM function to eliminate blanks if desired.

Syntax

[ < column_spec | "string" > || < column_spec | "string " > 
    [ || <column_spec | "string "[...] ]

Examples

Example 1: Column + text + Column

SELECT company,
CUSTOMERS.LASTNAME || ', ' || CUSTOMERS.FIRSTNAME 
FROM customers 
WHERE company = 'systems'

Example 2

SELECT
PRODUCTS.PRODUCT_NO || ' is the product number for ' || PRODUCTS.DESCRIPTION
FROM products
 
Back to top
dev/sql/functions/concatenation.1278440899.txt.gz ยท Last modified: 2016/06/28 22:38 (external edit)