Skip site navigation (1) Skip section navigation (2)

Re: Putting an aggregate value in an UPDATE statement...

From: John Gage <jsmgage(at)numericable(dot)fr>
To: NOVICE Postgres elist <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Putting an aggregate value in an UPDATE statement...
Date: 2010-06-02 08:02:02
Message-ID: 8F62B3B7-BCBB-4E90-A009-1D2083AA9621@numericable.fr (view raw or flat)
Thread:
Lists: pgsql-novice
In the first place, thanks a very great deal for all the feedback.   
Much appreciated.

In the second, the UPDATE statement I used as an example was really a  
kludge because I could not figure out how to place the same SELECT  
COUNT(*) expression into an INSERT statement.  Turns out that by  
enclosing _it_ in parentheses, everything is cool.  Superb.

John


> On Tuesday 1. June 2010 23.34.39 Tom Lane wrote:
>> Well, the main point is that the possible ambiguity means that SQL  
>> has
>> mandated you put parentheses around any sub-select.

In response to

Responses

pgsql-novice by date

Next:From: Michael DienerDate: 2010-06-02 14:23:20
Subject: sum multiple tables gives wrong answer?
Previous:From: Michelle KonzackDate: 2010-06-02 00:05:51
Subject: Re: Invitation to connect on LinkedIn

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group