Posted by stephen on 08/21/07 09:20
On Aug 21, 10:04 am, Yas <yas...@gmail.com> wrote:
> Hello,
>
> Suppose I have the following table...
>
> name employeeId email
> --------------------------------------------
> Tom 12345 t...@localhost.com
> Hary 54321
> Hary 54321 h...@localhost.com
>
> I only want unique employeeIds return. If I use Distinct it will still
> return all of the above as the email is different/missing. Is there a
> way to query in SQL so that only distinct employeeId is returned? no
> duplicates.
>
> I wouuld like to say WHERE no blank fields are present to get the
> right row to return.
>
> Many thanks
>
> Yas
Which row for Hary do you want to be returned? The one without an
email address or the one with the email address?
Navigation:
[Reply to this message]
|