Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

SQL Reference

Functions

Syntax

Example

 

SQL Reference

Joins

Nested Queries

Set Operations

ON CURSOR | INSTANCE

WITH Options

Commands

Functions

 

|| (Concatenation)

The || (two vertical bars) function returns a single concatenated character string made up of two or more character strings. CHAR||CHAR 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

string || string[ || string[...]]

string
string can be a literal or reference column data

|| (two vertical bars)
Required. The || (double vertical bars) is the concatenation character. It goes between two character strings to be concatenated together.

 

Example

select company,
CUSTOMERS.LASTNAME || ', ' || CUSTOMERS.FIRSTNAME
from customers
where company = 'systems'

OR

select
PRODUCTS.PRODUCT_NO || ' is the product number for ' || PRODUCTS.DESCRIPTION
from products

Top