字符串不包含数字

A string does not contain a number

正在 table 中查找 包含数字

的地址

所以“史密斯街”或“詹姆斯路”等

我尝试使用:

address_street not like '%[0-9]%'

但这没有用,因为结果返回了所有不是字面意思的字符串。

对于这种字符串调查,您可以使用正则表达式和 BigQuery 提供的相应函数。例如 REGEX_CONTAINS:

with sample as (
    select "39, Albert street" AS address_street
    union all select "Private Drive"
    union all select "10, Downing Street"
    union all select "Buckingham palace"
)

select * from sample 
where not regexp_contains(address_street, r'\d')

returns