Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id EAE8C9FBD40 for ; Thu, 5 Apr 2007 05:38:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 49872-01-5 for ; Thu, 5 Apr 2007 05:37:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtpout27.attiva.biz (smtpout27.attiva.biz [85.37.16.28]) by postgresql.org (Postfix) with ESMTP id AA7A79FBD16 for ; Thu, 5 Apr 2007 05:37:57 -0300 (ADT) Received: from fbcmfe02b11.fbc.local ([192.168.30.92]) by smtpout27.attiva.biz with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Apr 2007 10:37:55 +0200 Received: from dream ([88.34.161.130]) by fbcmfe02b11.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Apr 2007 10:37:54 +0200 Message-ID: <005b01c7775d$c4fa4b70$1102a8c0@dream> Reply-To: "Shavonne Marietta Wijesinghe" From: "Shavonne Marietta Wijesinghe" To: Subject: Insert only if not found Date: Thu, 5 Apr 2007 10:38:21 +0200 Organization: Studio FORM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0058_01C7776E.882FA440" 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: 05 Apr 2007 08:37:54.0839 (UTC) FILETIME=[B490A270:01C7775D] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.342 tagged_above=0 required=5 tests=AWL=-0.156, BAYES_50=0.001, HTML_40_50=0.496, HTML_MESSAGE=0.001, UPPERCASE_25_50=0 X-Spam-Level: X-Archive-Number: 200704/68 X-Sequence-Number: 28068 This is a multi-part message in MIME format. ------=_NextPart_000_0058_01C7776E.882FA440 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello everyone.. Here is the result of my Insert. and also the insert works ok. INSERT INTO MOD48_02 (ID, TE_INDI, TE_COGNOME, TE_NOME, TE_SESSO, = TE_ATTNASC, TE_LUONASC, TE_DTNASC, TE_PROVSTATO, TE_PROV, TE_PATERNITA, = TE_RICHIESTA, USERNAME, DATE_INSERTED, TIME_INSERTED) VALUES = ('127001200745101033', 'england', 'bloom', 'orlando', 'M', 'ww', = 'florida', '05/06/1984', 'america', 'UK', 'xx', 'no', 'demo', = '05/04/2007', '10.10.33'); But before i insert this record i want to check if the it hasn't been = inserted before. I want to use the following fields as the riefferent. = TE_COGNOME, TE_NOME, TE_SESSO, TE_DTNASC And if there is no record to match those 4 fields i want to insert it = else just a message saying that the record has been inserted b4. any idea to start with? Shavonne Wijesinghe ------=_NextPart_000_0058_01C7776E.882FA440 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello everyone..
 
Here is the result of my Insert. and = also the=20 insert works ok.
 
INSERT INTO MOD48_02 (ID, = TE_INDI,=20 TE_COGNOME, TE_NOME, TE_SESSO, TE_ATTNASC, TE_LUONASC, TE_DTNASC, = TE_PROVSTATO,=20 TE_PROV, TE_PATERNITA, TE_RICHIESTA, USERNAME, DATE_INSERTED, = TIME_INSERTED)=20 VALUES ('127001200745101033', 'england', 'bloom', 'orlando', 'M', 'ww',=20 'florida', '05/06/1984', 'america', 'UK', 'xx', 'no', 'demo', = '05/04/2007',=20 '10.10.33');
But before i insert this record i want = to check if=20 the it hasn't been inserted before. I want to use the following fields = as the=20 riefferent. TE_COGNOME, TE_NOME, TE_SESSO, TE_DTNASC
 
And if there is no record to match = those 4 fields i=20 want to insert it else just a message saying that the record has been = inserted=20 b4.
 
any idea to start with?
 
Shavonne = Wijesinghe
------=_NextPart_000_0058_01C7776E.882FA440--