pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thrasher <thrasher@fibers.upc.es>
To: pgsql-sql@postgresql.org
Subject: Re: Updating from select
Date: Thu, 03 Oct 2002 10:18:30 +0200
Message-ID: <3D9BFD56.5020808@fibers.upc.es> (raw)
References: <3D9B28B7.4000903@fibers.upc.es>
	<e3cmpuka7i9fpuu3o37u99j45plub789cu@4ax.com>

Hi Manfred,

Such a silly thing blocked me, and I was about to write a stored procedure.

Thanks a lot !!

BTW, does anyone knows about a RH7.2 or newer RPM of v7.3? Do I need any 
other tools not included in RH7.2 to compile it?

Thrasher

Manfred Koizar wrote:
> On Wed, 02 Oct 2002 19:11:19 +0200, Thrasher <thrasher@fibers.upc.es>
> wrote:
> 
>>UPDATE trans_log t SET t.cost =
>>  (SELECT SUM(p.cost) FROM products_log p WHERE p.trans = t.id)
> 
> 
> Thrasher, try it without the table alias t:
> 
> UPDATE trans_log SET cost =
>    (SELECT SUM(p.cost) FROM products_log p
>      WHERE p.trans = trans_log.id)
> 
> Servus
>  Manfred
> 
> 




view thread (3+ messages)

Message-ID: <3D9BFD56.5020808@fibers.upc.es>
Permalink:  ../3D9BFD56.5020808@fibers.upc.es/
Also on:    postgresql.org/message-id/3D9BFD56.5020808@fibers.upc.es

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: thrasher@fibers.upc.es
  Subject: Re: Updating from select
  In-Reply-To: <3D9BFD56.5020808@fibers.upc.es>

* 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