Subject | RE: [firebird-support] SQL UNION ALL |
---|---|
Author | Steffen Heil |
Post date | 2005-02-24T15:06:47Z |
Hi
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]
> Hi all,What about:
>
> 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.
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]