View Full Version : Composite Reporting
Dianne
01-05-2004, 10:16 AM
Using Oracle 9i and Oracle Discoverer or Oracle Reports (or other
tool) is it possible to create a single composite report that combines
records from multiple tables when each table has a different number
and type of fields? For instance, can you create a report that looks
like this:
TimeOfDay:xxx TableNumber:88 Field1:12.34 Field2:ABC Field3:698
TimeOfDay:xxx TableNumber:61 Field1:ABC
TimeOfDay:xxx TableNumber:22 Field1:47 Field2:9847
TimeOfDay:xxx TableNumber:88 Field1:4.56 Field2:DEF Field3:29
....
This example is pulling records from three different tables (#88, #61
and #22) and then sorting the results by TimeOfDay.
Bricklen
01-05-2004, 10:22 AM
Dianne wrote:
Using Oracle 9i and Oracle Discoverer or Oracle Reports (or other tool) is it possible to create a single composite report that combines records from multiple tables when each table has a different number and type of fields? For instance, can you create a report that looks like this: TimeOfDay:xxx TableNumber:88 Field1:12.34 Field2:ABC Field3:698 TimeOfDay:xxx TableNumber:61 Field1:ABC TimeOfDay:xxx TableNumber:22 Field1:47 Field2:9847 TimeOfDay:xxx TableNumber:88 Field1:4.56 Field2:DEF Field3:29 ... This example is pulling records from three different tables (#88, #61 and #22) and then sorting the results by TimeOfDay.
maybe something like this (using UNION or UNION ALL)
select TimeOfDay,TableNumber,Field1,Field2,NULL Field3
from table_22
union
select TimeOfDay,TableNumber,NULL Field1,NULL Field2,Field3
from table_61
union
select TimeOfDay,TableNumber,Field1,Field2,Field3
from table_88
order by TimeOfDay;
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.