Subject | RE: Re: [firebird-support] problem with left outer join |
---|---|
Author | Gary T. Benner |
Post date | 2006-08-08T06:03:19Z |
[Reply]
HI all,
Thanks Mitch, that was it.
kind regards
Gary
At 18:01 on 8/08/2006 you wrote
[Non-text portions of this message have been removed]
HI all,
Thanks Mitch, that was it.
kind regards
Gary
At 18:01 on 8/08/2006 you wrote
>To : firebird-support@yahoogroups.comRef#: 41006
>CC : >From: Mitch Peek, mitchp@...
>>Hi all,
>>
>>I'd like some input on an issue with using left outer join's which I use to retrieve data from tables where there may or may not be a record in the joined tables.
>>
>>This is our query:
>>
>> select *
>> from winetaste wt, wine w
>> left outer join person p on p.personid = wt.tasterid
>> left outer join region r on r.regionid = w.regionid
>> left outer join country c on c.countryid = r.countryid
>> left outer join winery y on y.wineryid = w.wineryid
>> where wt.wineid = w.vintageid
>> and wt.tasteid = 179008
>>
>>It fails with the error message "no current record for fetch operation".
>>
>> >>
>not sure about the error message, but isn't it a bad idea to mix SQL 89 >and SQL 92 join syntax as you have. >
>try this instead...
>
>select *
> from winetaste wt
> join wine w on wt.wineid=w.vintageid
> left outer join person p on p.personid = wt.tasterid
> left outer join region r on r.regionid = w.regionid
> left outer join country c on c.countryid = r.countryid
> left outer join winery y on y.wineryid = w.wineryid
> where wt.wineid = w.vintageid
> and wt.tasteid = 179008
>
>
>
[Non-text portions of this message have been removed]