Difference between revisions of "SQL String operators"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
String operators | String operators | ||
Line 37: | Line 30: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | SELECT trim(title) || ’ ’ || last_name as "Full Name"; | |
− | SELECT trim(title) || ’ ’ || last_name as "Full Name" | + | FROM customers; |
− | FROM customers | + | ORDER BY last_name |
− | ORDER BY last_name | + | |
</code> | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital, Recital Server |
[[Category:Documentation]] | [[Category:Documentation]] | ||
− | [[Category:SQL | + | [[Category:SQL|Operators,String]] |
− | + |
Latest revision as of 15:52, 5 July 2011
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
SELECT trim(title) || ’ ’ || last_name as "Full Name"; FROM customers; ORDER BY last_name
Products
Recital, Recital Server