Insert Question - Mailing list pgsql-novice

From
Subject Insert Question
Date
Msg-id 20061102200151.96558.qmail@web33305.mail.mud.yahoo.com
Whole thread Raw
Responses Re: Insert Question  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: Insert Question  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-novice
hhi all,

long time no askie question, but here goes...

i want to insert sequential document numbers into a
products table

my current setup is like so:

product_number document_number
1001
1002
1006
1005

i want an insert statement that will yield the
following:

product_number document_number
1001           42000001
1002           42000002
1006           42000003
1005           42000004

relative order means nothing, but i do want sequential
document numbers.

how can i go about getting this done as efficiently as
possible?

as always, tia.



__________________________________________________________________________________________
Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster.
(http://advision.webevents.yahoo.com/mailbeta)


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inserting Money Types
Next
From: Greg Lindstrom
Date:
Subject: Number of fields in split()