Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 06D6C2E0045 for ; Tue, 19 Feb 2008 06:01:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 18340-04 for ; Tue, 19 Feb 2008 06:01:09 -0400 (AST) Received: from smtpout25.fbc.local (smtpout25.attiva.biz [85.37.16.26]) by postgresql.org (Postfix) with ESMTP id 9D4EC2E0040 for ; Tue, 19 Feb 2008 06:01:12 -0400 (AST) Received: from FBCMFE02B17.fbc.local ([192.168.31.240]) by smtpout25.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Tue, 19 Feb 2008 11:01:10 +0100 Received: from dream ([88.34.161.130]) by FBCMFE02B17.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Tue, 19 Feb 2008 11:01:08 +0100 Message-ID: <00c001c872de$5a7dd000$3102a8c0@dream> Reply-To: "Shavonne Marietta Wijesinghe" From: "Shavonne Marietta Wijesinghe" To: Subject: SELECT DISTINCT Date: Tue, 19 Feb 2008 11:01:10 +0100 Organization: Studio FORM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00BD_01C872E6.BBE068F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-OriginalArrivalTime: 19 Feb 2008 10:01:08.0835 (UTC) FILETIME=[5967F330:01C872DE] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.031 tagged_above=0 required=5 tests=AWL=-1.266, HTML_MESSAGE=0.001, SUBJ_ALL_CAPS=1.806, UPPERCASE_50_75=0.49 X-Spam-Level: * X-Archive-Number: 200802/147 X-Sequence-Number: 30238 This is a multi-part message in MIME format. ------=_NextPart_000_00BD_01C872E6.BBE068F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello I have 2 records with the same value. Even when i do a select with = DISTINCT, it returns me both the records instead of one. SELECT DISTINCT ON (TE_COGNOME) TE_COGNOME, TE_NOME, N_GEN_TEST, = TE_SESSO, TE_ATTNASC, TE_LUONASC, TE_INDI, TE_DTNASC, TE_PROVSTATO, = TE_PROV, TE_PATERNITA, TE_RICHIESTA FROM MOD48_02 WHERE TE_COGNOME LIKE = 'WIJ%' AND TRIM(DELETED) IS NULL ORDER BY TE_COGNOME, N_GEN_TEST DESC; What should I do?? Thanks Shavonne ------=_NextPart_000_00BD_01C872E6.BBE068F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello
 
I have 2 records with the same value. = Even when i=20 do a select with DISTINCT, it returns me both the records instead = of=20 one.
 
SELECT DISTINCT ON (TE_COGNOME) = TE_COGNOME,=20 TE_NOME, N_GEN_TEST, TE_SESSO, TE_ATTNASC, TE_LUONASC, TE_INDI, = TE_DTNASC,=20 TE_PROVSTATO,  TE_PROV, TE_PATERNITA, TE_RICHIESTA FROM MOD48_02 = WHERE=20 TE_COGNOME LIKE 'WIJ%' AND TRIM(DELETED) IS NULL ORDER BY TE_COGNOME, = N_GEN_TEST=20 DESC;
 
What should I do??
 
 
Thanks
 
Shavonne

------=_NextPart_000_00BD_01C872E6.BBE068F0--