Newbie wonder...

From: Bernard Grosperrin <bernard(at)bgsoftfactory(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Newbie wonder...
Date: 2005-03-08 23:25:51
Message-ID: 1mmif8pua8zxb.q7qw4hme6jk5.dlg@40tude.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Please, bear with me, as this is my first post here.

(1) I have a 2 table database, result of a conversion from Access. This has
been made by an amateur, as one of the tables should be at least 3 related
tables, bunch of redundant data,and the other one 2.

I know I could create a table as the result of a request, so that I could
isolate these redundant data, but what I don't know is how I would in the
same time update the original table to put the ID of the matching ROW
number in the newly created table, instead of the redundant data ?

Should I create a stored procedure for that, and if yes, how ? Or should I
do that in 2 passes, sequentially ?

(2) How should I go to create a sequence for an existing table? For all
futures data entry, after this conversion, I want the unique ID for each
row to come from a sequence, but if I know how to create a table using
serial, I am not sure how to modify one for this.

Thanks,
Bernard

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kenneth Gonsalves 2005-03-09 06:05:55 datestyle setting
Previous Message Igor Kryltsov 2005-03-08 22:44:08 Re: Update PostgreSQL from MS SQL trigger