Subject RE: [firebird-support] SQL UNION ALL
Author Steffen Heil
Hi

> 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.

What about:

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



[Non-text portions of this message have been removed]