16.20 - Example: Accessing Serial ID Characters - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Functions, Expressions, and Predicates

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

If we want the last five characters of the serial ID, which represent manufacturing sequence number, another substring can be accessed.

   SELECT make, SUBSTRING (sn FROM 11) AS sequence 
   FROM autos
   WHERE SUBSTRING (sn FROM 3 FOR 3) = 'USA';