Subject Re: [firebird-support] Re: How many Unions allowed in firebird Select?
Author Daniel Rail
Hi,

At November 5, 2005, 2:26 PM, Tony Masefield wrote:

> <m.tonies@u...> wrote:
>>
>> Hello Tony,
>>
>> Naah, you just have to tell it what datatype to use for - in this
> case -
>> the first column:
>>
>> select cast('Minimum' as varchar(9) ), ...
>> UNION
>> select cast('Maximum' as varchar(9) ), ...
>>
> Thanks for the suggestion Martijn but same error code returned.
> Starnge that one UNION works OK but not two.

You say that when doing a union with the first two works. But what
happens that you forget the first union and only union the last two
selects(i.e. MAX with AVG)? Do you get the same error? And, if you
do, try casting AVG as the same datatype as the column.

--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)