About duplicates

From: Mario Filipe <mjnf(at)neptuno(dot)sc(dot)uevora(dot)pt>
To: pgsql-sql(at)postgresql(dot)org
Subject: About duplicates
Date: 1998-12-17 09:53:10
Message-ID: XFMail.981217095310.mjnf@neptuno.uevora.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

-----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(at)uevora(dot)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-----

Attachment Content-Type Size
signed PGP message application/pgp 1.3 KB

Browse pgsql-sql by date

  From Date Subject
Next Message Gregory Holston 1998-12-17 13:04:59 changing types
Previous Message David Hartwig 1998-12-15 14:55:24 Re: [SQL] MINUS and slow 'not in'