Received: from srvlnx02.pup.ch ([195.134.149.6]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4HDURA78941 for ; Thu, 17 May 2001 09:30:28 -0400 (EDT) (envelope-from juerg.rietmann@pup.ch) Subject: how to add an new record from part of an old one To: pgsql-sql@postgresql.org X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: From: juerg.rietmann@pup.ch Date: Thu, 17 May 2001 14:32:40 +0200 X-MIMETrack: Serialize by Router on srvlnx02/Pup/ch(Release 5.0.5 |September 22, 2000) at 05/17/2001 02:32:45 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Archive-Number: 200105/183 X-Sequence-Number: 3000 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 ============================================