[thelist] Weird SELECT DISTINCT error
Matt Warden
mwarden at gmail.com
Thu Dec 15 21:36:52 CST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Brian Cummiskey wrote:
> Casey wrote:
> The ONLY difference between the first and second is
>
>>the inclusion of "opp_id," - which should not make a lick of difference.
>>Right?
>
>
> Wrong.
>
> In the second, you're selecting the distinct property on opp_id, not
> policy_name.
Actually, you are selecting unique combinations of opp_id and
policy_name. If you think about it, since results are returned in rows,
it is difficult to see how DISTINCT could operate on only one column.
- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDojZUrI3LObhzHRMRAihoAJsF8hRaEmrDMRXqmxA2u+tyTv1LJACaAksQ
DM1zVX4S/FR/mMcqkOOlCgo=
=dSeq
-----END PGP SIGNATURE-----
More information about the thelist
mailing list