Re: UPDATE in a specific order - Mailing list pgsql-sql

From Luiz K. Matsumura
Subject Re: UPDATE in a specific order
Date
Msg-id 4D0BB39A.9040204@planit.com.br
Whole thread Raw
In response to Re: UPDATE in a specific order  (Jasen Betts <jasen@xnet.co.nz>)
List pgsql-sql
Thanks  for reply,<br /><br /> Em 16/12/2010 17:58, Jasen Betts escreveu: <blockquote
cite="mid:iedr1q$dv1$1@reversiblemaps.ath.cx"type="cite"><blockquote type="cite"><pre wrap="">I need to make update of
table1with data on table2 in the order of id
 
of table2
</pre></blockquote><pre wrap="">
that looks like EAV. is it?

</pre></blockquote><br /> Err, I don´t know so much about EAV, so I think that isn´t. I´m just trying to reproduce a
calcin a spreeadsheet. <blockquote cite="mid:iedr1q$dv1$1@reversiblemaps.ath.cx" type="cite"><blockquote
type="cite"><prewrap="">There are some way to do this with a UPDATE statement ?
 
</pre></blockquote><pre wrap="">
to do it with an update statement you need no more than one rows in the
from for each row in the target.

easiest non update statement approach is probably to use a plpgsql 
function with a loop.

basically you need to find another way to do it.

</pre></blockquote><br /> Ok! I make a function in plpgsql to do it.<br /><br /> Thank´s again !<br /><div
class="moz-signature"><br/><b><br /></b></div> 

pgsql-sql by date:

Previous
From: serviciotdf
Date:
Subject: Re: Translate Function PL/pgSQL to SQL92
Next
From: "Andrey Fokin"
Date:
Subject: Table name as a variable in SELECT query