16.20 - Example: Using a SELECT Statement to Request Substrings - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1145-162K
Language
English (United States)

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
    ...