Re: Update with a Repeating Sequence - Mailing list pgsql-general

From Steve Atkins
Subject Re: Update with a Repeating Sequence
Date
Msg-id CB8BCEA5-E9BD-443B-8128-E11FB91EDF5C@blighty.com
Whole thread Raw
In response to Re: Update with a Repeating Sequence  (Bill Thoen <bthoen@gisnet.com>)
List pgsql-general
On Oct 14, 2008, at 11:36 AM, Bill Thoen wrote:

> The table exists already; all I need to do is update the sequence
> code to make the records unique, but also I need each repeating set
> numbered from 0 (Zero) so I can select a list of unique farm field
> records where seq = 0.

"select distinct on (field_id) * from table;" should let you do that,
without requiring the repeating set stuff.

Cheers,
   Steve



pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: databases list to file
Next
From: Vladimir Dzhuvinov
Date:
Subject: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?