0

I am trying to set the values of an ARRAY to the result of GENERATE_ARRAY in Bigquery

DECLARE arr ARRAY <INT64>;
SET arr = (SELECT GENERATE_ARRAY(0,100,10));

But I am getting this error

Query error: Cannot coerce expression (SELECT GENERATE_ARRAY(0,100,10)) to type ARRAY<FLOAT64> 

What should I do? Thanks!

1 Answer 1

1

The answer is

DECLARE arr ARRAY <INT64>;
SET arr = GENERATE_ARRAY(0,100,10);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.