Subject Re: [firebird-support] data type unknown in UNION
Author Ann W. Harrison
tsangccn wrote:
>
> 3 SQL statements, each of which is running OK. But if I union them as
>
> <sql1> UNION ALL <sql2> UNION ALL <sql3>
>
> It failed with
>
> Dynamic SQL Error
> -SQL error code = -104
> -Invalid command
> -Data type unknown
>
>
> If I try <sql1> UNION ALL <sql2>, also failed
> If I try <sql2> UNION ALL <sql1>, also failed
> If I try <sql1> UNION ALL <sql3>, also failed
> If I try <sql3> UNION ALL <sql1>, also failed
> If I try <sql2> UNION ALL <sql3>, it is OK.
>
> What does the data type unknown mean?

It means that one of the fields in the select list of sql1 doesn't match
the data type used by the field in the same ordinal position in the
select lists of <sql2> and <sql3>


Regards,


Ann