Difference between revisions of "SQL String operators"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 48: Line 48:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SQL]]
 
[[Category:SQL]]
[[Category:Reference]]
 

Revision as of 15:30, 13 March 2009

SQL STRING OPERATORS

Class

SQL Applications


Purpose

String operators


Syntax

<expression1> operator <expression2>[ operator <expression3>…]


See Also

INSERT, OPERATORS, SELECT, UPDATE


Description

Operators used with Character expressions:


Operator Operation
|| Concatenate the <expression2> to the end of the <expression1> string
+ Concatenate the <expression2> to the end of the <expression1> string
- The <expression1> string is trimmed of trailing spaces, the <expression2> string is concatenated to the end of the <expression1> string and the previously trimmed spaces concatenated to the end of the <expression2> string


Example

EXEC SQL
SELECT trim(title) || ’ ’ || last_name as "Full Name"
FROM customers
ORDER BY last_name;


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer