In a message dated 98-10-15 09:32:51 EDT, you write:
select A from table 1
union
select A from table 2
union
…
with no aggregation.
How can I define this Object X in designer. It’s quite simple in SQL, I know.
this is impossible…
Okay, well, it might be impossible in BusinessObjects. But that just means you need to look for other avenues.
If you create a view on your Oracle database using the same SQL that you listed above, such as:
create view U_VIEW
as
Select A from Table 1
Union
Select A from Table 2
Union
Select A from Table 3
… then you can add that view to your universe, and create an object based on view column A. Whether you add aggregation to that object or not is up to you.
There are other issues with views (performance, etc.) but if you really need this as an object this is a possible solution.
One thing to keep in mind when using UNIONS in Oracle…
Oracle has two types of UNIONS, a UNION and a UNION ALL. A UNION will return every unique row from each table; a UNION ALL will return every row from each table, including duplicates.
If you have three tables, T1, T2, and T3, and each has a field A, and each table has a row where A = ‘ABCD’, then a UNION will return 1 row. A UNION ALL will return 3 rows.
Even if field A is distinct across T1, T2 and T3, you still may want to use UNION ALL instead of UNION, even though it makes no difference in the end results. The reason is that UNION has to sort through the results to eliminate duplicates; since UNION ALL allows duplicates, it does not have to sort. Thus, the UNION ALL can be faster than the UNION.
In a message dated 98-10-15 09:32:51 EDT, you write:
select A from table 1
union
select A from table 2
union
…
with no aggregation.
How can I define this Object X in designer. It’s quite simple in SQL, I know.
this is impossible…
Okay, well, it might be impossible in BusinessObjects. But that just means you need to look for other avenues.
If you create a view on your Oracle database using the same SQL that you listed above, such as:
create view U_VIEW
as
Select A from Table 1
Union
Select A from Table 2
Union
Select A from Table 3
… then you can add that view to your universe, and create an object based on view column A. Whether you add aggregation to that object or not is up to you.
There are other issues with views (performance, etc.) but if you really need this as an object this is a possible solution.