Subject | Re: [firebird-support] Problem with UNION |
---|---|
Author | Milan Babuskov |
Post date | 2005-09-07T13:39:21Z |
sifi24viper wrote:
example:
Of course, don't use "double precision" but whatever the datatype
VERBRAUCH_BGGA.MENGE is using.
--
Milan Babuskov
http://www.flamerobin.org
> Follow i have a UNION-Query that doesn't work!You need to cast() the datatypes of colums whose datatypes differ. For
> Invalid token.Dynamic SQL Error.
> SQL error code = -104.
> Invalid command.
> Data type unknown.
>
> But when i try the two SELECT-Statment separatly they work fine!
>
> May somebody have an idea!
example:
> 0 AS "Amin_Total",cast( 0 as double precision)
> SUM(VERBRAUCH_KSA.MENGE) AS "Sand_Total"cast(SUM(VERBRAUCH_KSA.MENGE) as double precision)
> SUM(VERBRAUCH_BGG.MENGE) AS "Amin_Total",cast(SUM(VERBRAUCH_BGGA.MENGE) as double precision)
> 0 AS "Sand_Total"cast( 0 as double precision)
Of course, don't use "double precision" but whatever the datatype
VERBRAUCH_BGGA.MENGE is using.
--
Milan Babuskov
http://www.flamerobin.org