ODBC Server Reference Manual

CORE SQL Language
HP NonStop ODBC Server Reference Manual429151-002
3-21
String Functions
String Functions
The NonStop ODBC Server supports the following CORE SQL string functions:
CONCAT
LENGTH
LOCATE
LTRIM
RTRIM
SUBSTRING
UCASE
CONCAT
The CONCAT function returns a character string that is the result of concatenating
string-expression2 to string-expression1. For example:
SELECT { fn CONCAT(first_name, last_name) FROM employee
or
SELECT --(*vendor(Microsoft),product(ODBC)
fn CONCAT(first_name, last_name)*)-- FROM employee
LENGTH
The LENGTH function returns the number of characters in string-expression,
excluding trailing blanks. For example:
SELECT last_name FROM employee
WHERE { fn LENGTH(last_name) } = 10
LOCATE
The LOCATE function returns the starting position of the first occurrence of
string-expression1 within string-expression2. The search begins with the
first position in string-expression2 . For example:
SELECT * FROM dept
WHERE { fn LOCATE("Marketing",deptname) } > 0
CONCAT ( string-expression1, string-expression2 )
LENGTH ( string-expression )
LOCATE ( string-expression1, string-expression2 )