Posted by Stefan Rybacki on 03/31/06 06:32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
strawberry schrieb:
> I think this is right...
>
> SELECT propertyid, MAX( valuationdate ) , valuation
> FROM properties
> GROUP BY propertyid
>
That doesn't work because valuation is unpredictable and the fact that
mysql isn't throwing an error does not meant that this is a wrong query.
So better use the solutions from Shaun. And I do even know another
solution for the case that there is no LIMIT or TOP available ;)
Regards
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
iD8DBQFELKK1yeCLzp/JKjARAt/RAJ4nWRAHQdqYVyvt8hprc7h9hhrXhgCgod9d
PIJ8wmI1cqXLaqB2oLPDXYs=
=9w+t
-----END PGP SIGNATURE-----
[Back to original message]
|