Received: from neptuno.uevora.pt (neptuno.sc.uevora.pt [193.136.216.24]) by hub.org (8.9.1/8.9.1) with ESMTP id EAA24170 for ; Thu, 17 Dec 1998 04:53:45 -0500 (EST) (envelope-from mjnf@neptuno.sc.uevora.pt) Received: (from mjnf@localhost) by neptuno.uevora.pt (8.9.1a/8.9.1/Debian/GNU) id JAA30540 for pgsql-sql@postgresql.org; Thu, 17 Dec 1998 09:53:10 GMT Message-ID: X-Mailer: XFMail 1.2 [p0] on Linux X-Priority: 3 (Normal) Content-Description: signed PGP message Content-Transfer-Encoding: 8bit Content-Type: application/pgp; format=text; x-action=sign MIME-Version: 1.0 Date: Thu, 17 Dec 1998 09:53:10 -0000 (WET) Sender: mjnf@neptuno.sc.uevora.pt From: Mario Filipe To: pgsql-sql@postgresql.org Subject: About duplicates -----BEGIN PGP SIGNED MESSAGE----- Hi Some time ago I made a question to this list about eliminating duplicates. Well I got some answers but they weren't very satisfying (sorry to the folks who awnsered). After that i did some digging i got this code from access: SELECT DISTINCTROW Alunos.curso, Inscricao.nAluno, Alunos.nome, Inscricao.codDisc, Inscricao.Descricao FROM Alunos INNER JOIN Inscricao ON Alunos.nAluno = Inscricao.nAluno WHERE (((Inscricao.nAluno) In (SELECT [nAluno] FROM [Inscricao] As Tmp GROUP BY [nAluno],[codDisc] HAVING Count(*)>1 And [codD isc] = [Inscricao].[codDisc]))) ORDER BY Alunos.curso, Inscricao.nAluno, Inscricao.codDisc; My question is if this code can be used in postgres, with some changes obviously? Merry Xmas Mario Filipe mjnf@uevora.pt http://neptuno.sc.uevora.pt/~mjnf -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: noconv iQEVAwUBNnjUg5iyznf+xIrhAQEUfggAiV3CMyiAgfLALMZE4qLDvpiut38s3b77 ToUfutd0LIexv9tGcW+7UgnZnxO5xxdWMS/qz01EZtP7ubIDzRpJObRR8ycZfIuQ 5cyG5MjdivrVfNmvo7mp67jKSR0gRJcysZkO6qQTxDa8jvevfpgaODgn1c3qTgc2 Sl8Xk+/8OSlVP7FShlDnQA2J/MmuGz9wjGHEVFVx9rw07MQsWJMNbEOzOld2uCpg mb/tEgcUOisH05B39kdVRP49mKheGmCQcNtGsdji0hzJFSf8hG26w2S7x9Nj00HJ d3GxlxpEgyD7BsECN+Gglk84NJuc/HJJIV3rQrBIjjClgH+xvr2btA== =Dsv0 -----END PGP SIGNATURE-----