Im trying to set the result of a query as an array. I can do this fine with only one column returned using the code below, but i get errors as soon as i try to add another column. How do i get multiple columns and store them in an array?
Thanks.
DECLARE my_array ARRAY<string>;
SET my_array = (
SELECT ARRAY_AGG(value_1,value2)
FROM `project.dataset.table`
WHERE somthing = 'somthing'
);