17.10 - Example: Applying INDEX to the SPACE Character - Advanced SQL Engine - Teradata Database

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

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
kby1472250656485

In this example, INDEX is applied to ' ' (the SPACE character) in the value strings in the Name column of the Employee table.

   SELECT name 
   FROM employee 
   WHERE INDEX(name, ' ') > 6 ; 

INDEX examines the Name field and returns all names where a space appears in a character position beyond the sixth (character position seven or higher).