Hi,
I know this kind of a question is asked earlier, but I couldn't find an
answer there (in the previous round of posting).
Instead of wanting to update the first record in an UPDATE .. ORDER BY
condition, (because of triggers that act downward) what I want is that all
records be updated, but in
aran
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On
Behalf Of Rodrigo CarvalhaesSent: Tuesday, April 26, 2005 8:43
AMCc: pgsql-sql@postgresql.orgSubject: [SQL] UPDATE WITH
ORDER BY
Hi Guys!I need to make an
UPDATE on a column reordering it with a seque
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
(Please send email as text, not HTML)
> I need to make an UPDATE on a column reordering it with a sequence
> using order by a description
> ...
BEGIN;
CREATE SEQUENCE fruit_seq;
CREATE TABLE newfruit AS SELECT nextval('fruit_seq')::int AS newid, *
Thanksyou and Franz for your help. Simple and efficient... I was
blind The plpgsql "for" is the perfect solution
It was great. Have a nice week!!!
Cheers,
Rodrigo Carvalhaes
Christoph Haller wrote:
Rodrigo Carvalhaes wrote:
Hi Guys!
I need to make an UPDATE on a column reorder
> Rodrigo Carvalhaes wrote:
>
> Hi Guys!
>
> I need to make an UPDATE on a column reordering it with a sequence
> using order by a description.
> Confusing??? Well.. Let me give an example...
>
> Today, my table it's organized like this:
>
> Code / Description
> 9 Orange
> 15
Hi Guys!
I need to make an UPDATE on a column reordering it with a sequence
using order by a description.
Confusing??? Well.. Let me give an example...
Today, my table it's organized like this:
Code / Description
9 Orange
15 Apple
1 Pear
3 Tomato
I wa