Subject Re: [firebird-support] Problem with sql
Author Nick Upson
does this do what you want?

select first 1 C.Number, C.Name, A.Number, A.Name
from Client C left outer join Animal A on A.Owner = C.Number



>From: Sandeep Chandra <sandeep@...>

>The following query returns a separate line for each animal with client
>details duplicated as expected.
>
>
>select C.Number, C.Name, A.Number, A.Name
>from Client C left outer join Animal A on A.Owner = C.Number
>
>
>As a user option we need to select the first animal that matches (ie
>distinct in the client number only).
>
>Is there some easy way to do this ? A First function would have been ideal

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband