pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: goldgraeber-werbetechnik@t-online.de
To: pgsql-general@lists.postgresql.org
Subject: short sql question
Date: 18 Jun 2021 07:15:29 -0000
Message-ID: <wolfgang-1210618091529.A0132500@linux-tuxedo> (raw)


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

--- gets syntax error at "from"

(Using PostgreSQL 10.4 on a NAS box)

Best regards
Wolfgang







view thread (2+ messages)  latest in thread

Message-ID: <wolfgang-1210618091529.A0132500@linux-tuxedo>
Permalink:  ../wolfgang-1210618091529.A0132500@linux-tuxedo/
Also on:    postgresql.org/message-id/wolfgang-1210618091529.A0132500@linux-tuxedo

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: goldgraeber-werbetechnik@t-online.de
  Subject: Re: short sql question
  In-Reply-To: <wolfgang-1210618091529.A0132500@linux-tuxedo>
  References: <wolfgang-1210618091529.A0132500@linux-tuxedo>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox