Reporting on Multiple Detail Tables
Posted in 1993
OK. Here's the picture. We're running Informix 4.10.UD2 and
have a database which contains 3 tables.
I have a master table and 2 detail tables which are joined
together via a primary key (social security number). How can
I get a report for every row in both detail tables for their
corresponding entry in the master table WITHOUT reporting on
every row in detail table 1 for each row in detail table 2.
(Which results in massive amounts of duplicate data appearing)
Master table:
name, ss_number
Detail table 1:
ss_number, foo_date
Detail table 2:
ss_number, moo_date
select name, master.ss_number, foo_date, moo_date
from master, detail1, detail2
where master.ss_number = detail1.ss_number
and master.ss_number = detail2.ss_number
order by 2
SAMPLE OUTPUT:
Henry 555-55-5555 01/01/90 05/05/91
01/01/90 08/18/92
01/01/90 12/19/92
There has GOT to be a way around this....
Isn't this do-able with the standard engine and JUST ISQL???
Jerry D. Pierce
jdpierc@netcom.com