From: | juerg(dot)rietmann(at)pup(dot)ch |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | sql statement how to do ? |
Date: | 2002-07-05 09:02:59 |
Message-ID: | OFE12270DD.E9422A84-ONC1256BED.00312C52-C1256BED.0031B2A6@pup.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello everybody
I have a question regarding an sql statement. I need to insert a new record
into the table auftrag that is the almost the same as an existing record.
In a similar situation i I use
INSERT INTO auftrag_archiv (SELECT * FROM auftrag where a_id = '12345');
Now I need to do the following :
INSERT INTO auftrag (SELECT * FROM auftrag where a_id = '12345');
The problem is, that the table auftrag has a primay key called pk_auftrag.
Do this I get an error regarding duplicate pk_auftrag. Is there a way to
spare pk_auftrag somehow ?
Thanks in advance ... jr
__________________________________________________
PFISTER + PARTNER, SYSTEM - ENGINEERING AG
Juerg Rietmann
Grundstrasse 22a
6343 Rotkreuz
Switzerland
internet : www.pup.ch
phone : +4141 790 4040
fax : +4141 790 2545
mobile : +4179 211 0315
__________________________________________________
From | Date | Subject | |
---|---|---|---|
Next Message | stephane | 2002-07-05 09:41:09 | algoritme |
Previous Message | teknokrat | 2002-07-05 08:32:33 | How do i return a dataset from a stored procedure |