| From: | rajanski <raliski(at)gmail(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Putting an aggregate value in an UPDATE statement... |
| Date: | 2012-03-02 14:38:17 |
| Message-ID: | 1330699097187-5531137.post@n5.nabble.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Okay I have a similar but seemingly more complicated Problem with aggregate
values in an UPDATE statement:
update test set ew_data_vm_fraction =
array_agg(unnest(ew_data_vm) * area_percentage)
gives me the obvious "ERROR: cannot use aggregate function in UPDATE"
message
when I set i in parentheses
update test set ew_data_vm_fraction =
(select array_agg(unnest(ew_data_vm) * area_percentage)
from test
it results in the message: "ERROR: set-valued function called in context
that cannot accept a set"
i am really desperate,what can I try else?
Greetings!
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Putting-an-aggregate-value-in-an-UPDATE-statement-tp2140836p5531137.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | rajanski | 2012-03-02 14:45:24 | Re: Putting an aggregate value in an UPDATE statement... |
| Previous Message | Bob McConnell | 2012-03-02 12:09:20 | Re: Quoted string in select and insert |