From: | "Georg H(dot)" <georg-h(at)silentrunner(dot)de> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: short sql question |
Date: | 2021-06-18 11:31:19 |
Message-ID: | 36242505-b312-d4ec-3331-fac467d1ddf4@silentrunner.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
Am 18.06.2021 um 09:15 schrieb goldgraeber-werbetechnik(at)t-online(dot)de:
> Hi,
>
> I just cannot see what is wrong with my query:
>
> create table files (id int, name text, prev_name text, ....);
> create table fnchanged (id int, name text);
>
> update files f set prev_name = f.name, name = c.name from fnchanges c where f.id = c.id and c.name != f.name
your update statement works for me after changing
from fnchanges
to
from fnchanged
(as written in your create statement) but I've gotERROR: relation "fnchanges" does not exist instead of a syntax error
>
> --- gets syntax error at "from"
>
> (Using PostgreSQL 10.4 on a NAS box)
>
> Best regards
> Wolfgang
>
kind regards
Georg
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Jungwirth | 2021-06-18 18:28:26 | Re: Temporal tables as part of main release |
Previous Message | goldgraeber-werbetechnik | 2021-06-18 07:15:29 | short sql question |