Example: Using a SELECT Statement to Request Substrings

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

The following example shows a SELECT statement requesting substrings from a character field in positions 1 through 4 for every row:

   SELECT SUBSTRING (jobtitle FROM 1 FOR 4) 
   FROM employee ;

The result is as follows.

   Substring(jobtitle From 1 For 4)
   --------------------------------
   Tech 
   Cont 
   Sale 
   Secr 
   Test
    ...