I am getting error while running the below code. I did SELECT INTO in PLSQL but not understanding how to do same in bigquery.
CREATE OR REPLACE PROCEDURE `linear-charmer-344806.2143.Test`(name STRING, OUT id STRING)
begin
set (id) =(select roll from `linear-charmer-344806.2143.Employee`
where name = "Triparna");
end;
you should have either scalars on both sides or structs on both sides
for example
scalars
set id =(select roll from `linear-charmer-344806.2143.Employee`
where name = "Triparna");
or structs
set (id) =(select as struct roll from `linear-charmer-344806.2143.Employee`
where name = "Triparna");
In your case, looks like former option is the way to go
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.