Example: Using a SELECT Statement to Request Substrings - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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