pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: juerg.rietmann@pup.ch
To: pgsql-sql@postgresql.org
Subject: how to add an new record from part of an old one
Date: Thu, 17 May 2001 14:32:40 +0200
Message-ID: <OF1B99BF3B.7C029D4A-ONC1256A4F.00448E75@pup.ch> (raw)

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
============================================




view thread (2+ messages)  latest in thread

Message-ID: <OF1B99BF3B.7C029D4A-ONC1256A4F.00448E75@pup.ch>
Permalink:  ../OF1B99BF3B.7C029D4A-ONC1256A4F.00448E75@pup.ch/
Also on:    postgresql.org/message-id/OF1B99BF3B.7C029D4A-ONC1256A4F.00448E75@pup.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: juerg.rietmann@pup.ch
  Subject: Re: how to add an new record from part of an old one
  In-Reply-To: <OF1B99BF3B.7C029D4A-ONC1256A4F.00448E75@pup.ch>
  References: <OF1B99BF3B.7C029D4A-ONC1256A4F.00448E75@pup.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox