Subject SQL UNION ALL
Author Alberto Pesce
Hi all,

why this union don't work:

SELECT SUM(A), B, C, D
FROM X,T,Z
WHERE set_condition_1
GROUP BY B, C, D, A
ORDER BY B

UNION ALL

SELECT SUM(A), B, C, D
FROM X,T,Z
WHERE set_condition_2
GROUP BY B, C, D, A
ORDER BY B

The queries above (separated) work fine but if I use the statemant union I obtain a SQL error.

thanks a lot
bye
Alberto



____________________________________________________________
Navighi a 2 MEGA e i primi 3 mesi sono GRATIS.
Scegli Libero Adsl Flat senza limiti su http://www.libero.it