Subject | Re: [firebird-support] UNION question |
---|---|
Author | Helen Borrie |
Post date | 2003-08-31T13:33:05Z |
At 01:27 PM 31/08/2003 +0200, you wrote:
select cast('abc' as varchar(40)) from rdb$database
union all
select surname from responder
heLen
>(using FB 1.5 rc4) is this kind of statement possible:You need to cast the "wild" column to match the type of the unioned column:
>
>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.
select cast('abc' as varchar(40)) from rdb$database
union all
select surname from responder
heLen