Subject | Re: [firebird-support] Problem with sql |
---|---|
Author | Nick Upson |
Post date | 2003-07-07T09:38:56Z |
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
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband
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