How to use substring() function

This classic string function has two different names in BigQuery: substring and substr.

select substring('hello how are you', 7, 3) as substring,
       substr('hello how are you', 7) as substr
substring substr
how how are you

The second parameter specifies the position where the substring starts and the third parameter is the length of the substring to extract.

IN THIS PAGE