Afficher un message
Vieux 18/09/2007, 13h27   #5
David Portas
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Retrieve ONLY first/max

On 18 Sep, 08:30, Ed Murphy <emurph...@socal.rr.com> wrote:
>
> This could return multiple values if there's a tie for most
> common type.


Correct. So could the version using TOP WITH TIES. Mark said: "I want
to know the type that has the max units in any group". If there is
more than one such type then the specification is incomplete because
Mark doesn't say which one should come "first". Rather than pick a
random row or make the assumption that there is only one row I decided
it was safer to return everything - that way Mark can decide for
himself whether he needs to refine his spec.

--
David Portas

  Réponse avec citation
 
Page generated in 0,05021 seconds with 9 queries