Skip to content
Advertisement

Can’t SET variable in BigQuery | Error: Cannot coerce expression

I’m trying to set variable in order to make further operation.

But when I set my first variable on line 2 (“SET(new_user)=( “), I get an error

Query error: Cannot coerce expression ( SELECT COUNT(*) FROM…

The problem is coming the way I use the SET because my SELECT work without.

Advertisement

Answer

Depends on what your real needs – i see few options to fix the issue

Option 1

Option 2

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement