Pattern matching in Big query vs SSMS-Return strings which contain special characters or numerics

Viewed 53

I'm a bit lost.

I've had a look at the documentation but I'm not sure if you can use LIKE and pattern match in Big Query the same as SSMS.

The code shown here works in SSMS but the results are not correct in Big Query, so was wondering if there was another way to do it.

WHERE column_name NOT LIKE '[a-Z]%'

I'm looking to return strings which contain special characters or numerics.

1 Answers

Use REGEXP_CONTAINS instead

where not regexp_contains(column_name, r'[a-zA-Z]')

Meantime, LIKE is also supported as a comparison operator

Related