Subject | Re: [firebird-support] SQL UNION ALL |
---|---|
Author | Thomas Steinmaurer |
Post date | 2005-02-24T08:26:56Z |
Hi,
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com
> why this union don't work:Remove the ORDER BY clause in the first select statement.
>
> 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.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com