Neoview SQL Reference Manual (R2.4 SP2)

LEFT Function
The LEFT function returns the leftmost specified number of characters from a character expression.
Every character, including multibyte characters, is treated as one character.
LEFT is a Neoview SQL extension.
LEFT (character-expr, count)
character-expr
specifies the source string from which to return the leftmost specified number of characters.
The source string is an SQL character value expression. The operand is the result of evaluating
character-expr. See “Character Value Expressions” (page 243).
count
specifies the number of characters to return from character-expr. The number count
must be a value of exact numeric data type greater than or equal to 0 with a scale of zero.
Examples of LEFT
Return 'Robert':
LEFT ('Robert John Smith', 6)
Use the LEFT function to append the company name to the job descriptions:
UPDATE persnl.job
SET jobdesc = LEFT (jobdesc, 11) ||' COMNET';
SELECT jobdesc FROM persnl.job;
Job Description
------------------
MANAGER COMNET
PRODUCTION COMNET
ASSEMBLER COMNET
SALESREP COMNET
SYSTEM ANAL COMNET
ENGINEER COMNET
PROGRAMMER COMNET
ACCOUNTANT COMNET
ADMINISTRAT COMNET
SECRETARY COMNET
--- 10 row(s) selected.
400 SQL Functions and Expressions