问题
How to find substrings in Bigquery? I couldn't find any function which supports firing queries like 'Substring(Column_Name,3,7)'. Is there any way out to achieve the same functionality in Bigquery?
回答1:
#standardSQL
WITH yourTable AS (
SELECT 'Finding Substring in Bigquery' AS Column_Name
)
SELECT SUBSTR(Column_Name, 9, 12)
FROM yourTable
So SUBSTR(value, position [, length]) is for you to use
See String Functions for more
回答2:
You can use substr e.g. substr(Column_Name,3,7)
来源:https://stackoverflow.com/questions/46209955/finding-substring-in-bigquery