how to add an new record from part of an old one - Mailing list pgsql-sql

From juerg.rietmann@pup.ch
Subject how to add an new record from part of an old one
Date
Msg-id OF1B99BF3B.7C029D4A-ONC1256A4F.00448E75@pup.ch
Whole thread Raw
List pgsql-sql
Hi there

I need to half copy and insert new data in a new record. Please see the SQL
statement, that is not working, but i think is shows what I'd like to do.
The fields a_nr and a_kurzbez will get the values from a form and a_bez
needs to be copied from an existing auftrag.

Thanks for any help ... jr


insert into auftrag (a_nr, a_kurzbez) values (123456789, 'testtext')
(select a_bez from auftrag where a_nr='200113672732')


============================================
PFISTER + PARTNER, SYSTEM - ENGINEERING AG
Juerg Rietmann
Grundstrasse 22a
6343 Rotkreuz
Switzerland

phone: +4141 790 4040
fax: +4141 790 2545
mobile: +4179 211 0315
============================================



pgsql-sql by date:

Previous
From: Jonathan Bartlett
Date:
Subject: Re: Setting session global variables
Next
From: George Moga
Date:
Subject: Re: how to add an new record from part of an old one