Subject Re: [firebird-support] Left Outer Join
Author Martijn Tonies
Hi,

> the following script gives different results:
>
> select
> materialart.abfallschluessel,
> materialart.unterschluessel,
> entsorgungskopf.entsorger,
> entsorgungskopf.projekt,
> entsorgungsposition.teilobjekt,
> entsorgungsposition.datum
> from
> materialart left outer join entsorgungskopf
> on materialart.abfallschluessel = entsorgungskopf.abfallschluessel
> and materialart.unterschluessel = entsorgungskopf.unterschluessel
> left outer join entsorgungsposition
> on entsorgungskopf.lfd_ent_kop_nr =
entsorgungsposition.lfd_ent_kop_nr
> where
> (entsorgungsposition.datum is null)
> or ('01.04.2006' <= entsorgungsposition.datum and
entsorgungsposition.datum
> <= '19.04.2006');
>
> The result from one database includes all records from materialart (as
> expected).
>
> The result from the customer database includes only those records from
> materialart where a matching entry is found.
>
> Is this different behavior configurable? Where?

Wouldn't it be a bit strange if you could influence the behaviour
of OUTER JOIN with a setting?? :-)

First thing first:
1) check the data
After all, you do have a WHERE clause which could filter the results.
Is the data at your test DB the same as the customer data? Are the
server versions the same?

2) check the DB for corruption. In indices are corrupt, some data
might appear to be missing.


Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com