Subject RE: [IBO] Updating left outer join
Author Helen Borrie
At 12:13 AM 6/06/2006, you wrote:
>
>
> > -----Original Message-----
> > From: IBObjects@yahoogroups.com
> > [mailto:IBObjects@yahoogroups.com] On Behalf Of Helen Borrie
> > Sent: 05 June 2006 14:47
> > To: IBObjects@yahoogroups.com
> > Subject: RE: [IBO] Updating left outer join
> >
> > At 10:08 PM 5/06/2006, you wrote:
> >
> > > >
> > > > Try improving the syntax for the main query:
> > > >
> > > > select s.rec,s.shipment,s.whs,s.pid,s.qty,s.alloc,w.description
> > > > from warehouses w
> > > > left outer join shipment_allocations s
> > > > on s.whs=w.ref
> > > > WHERE s.shipment=:shipment and s.pid=:pid
> > > >
> > > > Helen
> > > >
> > >That breaks it, I always want the grid populated with fields from
> > >warehouses even when there is no data in shipment_allocations.
> > >Changing it as you suggest returns no rows ;-(
> >
> > That sounds suspect. Where did you test it?
> >
> > What's the PK of warehouses?
> >
> > Helen
> >
>Sounds logical to me ;-) if you put the conditions in the where clause you
>are filtering the joined rows - result=none. However if you put them in the
>join conditions you filter the right hand table only, therefore returning
>the left table rows.

It doesn't sound logical to me. Current Fb versions have a
distribution problem with RIGHT joins which can be worked around by
meshing the join and selection conditions.

The selection conditions here are on the left table, not the
right. That means the left stream will be made first, before testing
the right stream.

So I'm still suspicious about how you're testing this.

>Tested in IBExpert.

It still doesn't say how you're testing it, e.g. how (or if) you are
applying the values to the parameters.

>Tables have PK of rec.

OK.

Helen

P.S. I'm going off the radar for a few days to go to the Wintry
South for Delphi conferences. Might get a chance to look over list
and IBO customer mail briefly but I'm not counting on it.


Helen