I'm running an sql query to update multiple rows at once. The below code works in mysql, but when I run it in bigquery PRIORITY is set to null. What is wrong with my syntax?
UPDATE griffinDataset
SET PRIORITY = (case when SDC_LOCATIONID = 5920 then 1
when SDC_LOCATIONID = 5965 AND DFC_LOCATIONID = 5882 then 2
when SDC_LOCATIONID = 5362 AND DFC_LOCATIONID = 5882 then 3
when SDC_LOCATIONID = 5852 AND DFC_LOCATIONID = 5882 then 4
end) WHERE 1=1;