Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 3A45B9FB787 for ; Mon, 2 Apr 2007 11:52:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 68466-01-4 for ; Mon, 2 Apr 2007 11:52:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtpout13.attiva.biz (smtpout13.attiva.biz [85.37.16.15]) by postgresql.org (Postfix) with ESMTP id A3CCA9FB7E4 for ; Mon, 2 Apr 2007 11:52:39 -0300 (ADT) Received: from FBCMFE02B06.fbc.local ([192.168.30.94]) by smtpout13.attiva.biz with Microsoft SMTPSVC(6.0.3790.1830); Mon, 2 Apr 2007 16:52:29 +0200 Received: from dream ([88.34.161.130]) by FBCMFE02B06.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Mon, 2 Apr 2007 16:52:22 +0200 Message-ID: <00c301c77536$938a32e0$1102a8c0@dream> Reply-To: "Shavonne Marietta Wijesinghe" From: "Shavonne Marietta Wijesinghe" To: Subject: Update problem. Date: Mon, 2 Apr 2007 16:52:46 +0200 Organization: Studio FORM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00C0_01C77547.56AEE9E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-OriginalArrivalTime: 02 Apr 2007 14:52:22.0570 (UTC) FILETIME=[852310A0:01C77536] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.389 tagged_above=0 required=5 tests=AWL=0.253, BAYES_50=0.001, HTML_50_60=0.134, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200704/8 X-Sequence-Number: 28008 This is a multi-part message in MIME format. ------=_NextPart_000_00C0_01C77547.56AEE9E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello I have a table created as the following CREATE TABLE mod48_00_2007 ( id text, n_gen serial NOT NULL, formstore text, te_cognome text, te_paternita text, te_nome text, te_sesso text, te_dtnasc text, te_attnasc text, te_luonasc text, te_provstato text, te_indi text, te_prov text, te_richiesta text, atto_forma text, rev_test text, atto_dt text, atto_num text, dt_olog text, cod_notaio text, pa_cognome text, pa_nome text, pa_qual text, pa_indirizzo text, pa_civ text, pa_cap text, pa_pro text, pa_sede text, pa_estero text, pa_data text, f_olo text, f_pub text, f_rev text, f_seg text, f_spe text, atto_riferimento text, ratto_dt text, ratto_num text, rdt_olog text, r_cognome text, r_nome text, r_qual text, r_sede text, r_estero text, dt_oggi text, n_pub_aut text, dt_tr_rgt text, sche_singola text, sche_multipla text, n_fog text, tot_n_fog text, reg_anno text, username text, date_inserted text, time_inserted text, deleted text, date_deleted text, time_deleted text, f_tes text, CONSTRAINT mod48_00_2007_pkey PRIMARY KEY (n_gen) )=20 At a surtain point i need to replace a record with another For example i have inserted 4 records. (1, 2 , 3 , 4) I need to replace = all the values from the record 4 to the record 2 but keeping the n_gen = serial key. And then delete the record 4. So that the next record i = insert will take the n_gen 4 How can i do this? Shavonne Wijesinghe ------=_NextPart_000_00C0_01C77547.56AEE9E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Hello
 
I have a table created as the=20 following
 
CREATE TABLE = mod48_00_2007
(
  id text,
  n_gen serial NOT = NULL,
 =20 formstore text,
  te_cognome text,
  te_paternita=20 text,
  te_nome text,
  te_sesso text,
  = te_dtnasc=20 text,
  te_attnasc text,
  te_luonasc text,
 =20 te_provstato text,
  te_indi text,
  te_prov = text,
 =20 te_richiesta text,
  atto_forma text,
  rev_test = text,
 =20 atto_dt text,
  atto_num text,
  dt_olog text,
  = cod_notaio text,
  pa_cognome text,
  pa_nome = text,
 =20 pa_qual text,
  pa_indirizzo text,
  pa_civ = text,
 =20 pa_cap text,
  pa_pro text,
  pa_sede text,
  = pa_estero=20 text,
  pa_data text,
  f_olo text,
  f_pub=20 text,
  f_rev text,
  f_seg text,
  f_spe=20 text,
  atto_riferimento text,
  ratto_dt = text,
 =20 ratto_num text,
  rdt_olog text,
  r_cognome = text,
 =20 r_nome text,
  r_qual text,
  r_sede text,
  = r_estero=20 text,
  dt_oggi text,
  n_pub_aut text,
  = dt_tr_rgt=20 text,
  sche_singola text,
  sche_multipla = text,
  n_fog=20 text,
  tot_n_fog text,
  reg_anno text,
  = username=20 text,
  date_inserted text,
  time_inserted = text,
 =20 deleted text,
  date_deleted text,
  time_deleted=20 text,
  f_tes text,
  CONSTRAINT mod48_00_2007_pkey = PRIMARY KEY=20 (n_gen)
)
 
At a surtain point i need to replace a = record with=20 another
 
For example i have inserted 4 records.=20 (1, 2 , =20 3 , 4) I need to=20 replace all the values from the record 4 to the record 2 but keeping the = n_gen serial key. And then = delete the=20 record 4. So that the next record i insert will take the n_gen=20 4
 
How can i do this?
 
Shavonne = Wijesinghe
------=_NextPart_000_00C0_01C77547.56AEE9E0--