0

I have this UPDATE in MonetDB (version 11.41.11):

with t as (select distinct cod_atc_nl_1 , desc_atc_nl_1 from uruguay.staging_rm_dims where desc_atc_nl_1 is not null order by 1)
update uruguay.staging_rm_dims
set
desc_atc_nl_1 = t.desc_atc_nl_1,
desc_atc_nl_2 = t.desc_atc_nl_1,
desc_atc_nl_3 = t.desc_atc_nl_1,
desc_atc_nl_4 = t.desc_atc_nl_1
where
desc_atc_nl_1 is null
and desc_atc_nl_2 is null
and desc_atc_nl_3 is null
and desc_atc_nl_4 is null
and cod_atc_nl_4 is not null
and cod_atc_nl_1 = t.cod_atc_nl_1;

When I executing this sentence, I get the following error:

SQL Error [42S22]: SELECT: no such column 't.cod_atc_nl_1'

enter image description here

Is sintax incorrect?

Thank you.

Llorieb
  • 25
  • 5

1 Answers1

0

This was an issue fixed at the version 11.41.1. The with relation must be specified on the from clause.