Subject Re: [firebird-support] UNION question
Author Helen Borrie
At 01:27 PM 31/08/2003 +0200, you wrote:

>(using FB 1.5 rc4) is this kind of statement possible:
>
>SELECT 'abc' AS c1 FROM RDB$DATABASE
> UNION ALL
>SELECT c1 FROM some_table
>
>where some_table.c1 is a varchar / char column? I
>get SQLCODE -104 errors but can't find any
>method of casting the 'abc' which will work with the
>union statement.

You need to cast the "wild" column to match the type of the unioned column:

select cast('abc' as varchar(40)) from rdb$database
union all
select surname from responder

heLen