Need help with SQL

From: <atyagi_at_mc.xerox.com>
Date: 1996/11/07
Message-ID: <NEWTNews.847379219.13325.atyagi_at_sgeier.wsp>#1/1


Hi folks,

        Thanks to all who helped me last time. I have another question for you. I have written a query using UNION operator. I have tested these two queries seprately and they work well, but when I use the UNION an error appears telling me that UNION is an unknown command.. strange!

here is my query :

SELECT input_date, SUM(totbo) as USCO_TOTBO, SUM (xci_count) as XCI_TOTBO FROM
(SELECT input_date, totbo, 0 as xci_count

	FROM uscobosum 
	WHERE input_date >= ADD_MONTHS(sysdate,-24) and (TO_CHAR(input_date,'DAY') like 'M%')

 UNION  SELECT input_date,0 as totbo, sum(totbo)

  	FROM xci_bo 
 	WHERE input_date >=ADD_MONTHS(sysdate,-24)
  	GROUP BY input_date

 )
GROUP BY input_date;

I will appreciate any help:

Please post or mail to

atyagi_at_mc.xerox.com Received on Thu Nov 07 1996 - 00:00:00 CET

Original text of this message