Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNION ALL and Discoverer complex folders

Status
Not open for further replies.

Jojomick

Programmer
Jun 23, 2003
13
CA
I have a SQL script that works in a custom folder using the UNION ALL insruction. What I want is to be able to reproduce it with complex folders. Since conditions and new elements apply to the whole folder, I was able to make 2 separate complex folders for each «part» of the UNION statement. I'm looking for a way to «unionize» those folders.

Here is an example of the script :

(The whole works great in a custom folder)
SELECT (this part in complex folder 1)
'On hands' grp_description,
Fiscal_year,
Close_code,
FROM
a Time,
b Status
c Products
WHERE
a.key = c.Time_key AND
b.key = c.Stat_key AND
TO CHAR(c.Effective_date, 'DD/MM') = '01/01'

UNION ALL

SELECT (this part in complex folder 2)
'Shipped' grp_description,
Fiscal_year,
Close_code,
FROM
a Time,
b Status
c Products
WHERE
a.key = c.Time_key AND
b.key = c.Stat_key AND
TO CHAR(c.Effective_date, 'DD/MM') = '31/12'

Any idea ??

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top