Subject UNION
Author Jonathan M. Freedman
i have a query i am developing using the query component...it
involves combining parts of two tables with a UNION command...the
query builds and prepares when i UNION two tables, but when i add the
3rd, it doesn't prepare...it gives me back an error message that i
have an unknown data type. Both the query and the error message are
printed below...cbuilder 6 prof, firebird 1.5 rc7, ibo 4.3.A.a.,
windows xp prof. How does one UNION 3 tables?

tyia

SELECT
CH.NAM
, CH.DOB
, CH.REL
, CH.CLNTFK
, CH.HXCHILDPK

FROM HXCHILD CH
UNION
SELECT
SI.NAM
, SI.DOB
, SI.REL
, SI.CLNTFK
, SI.HXSIBSPK
FROM HXSIBS SI

UNION

SELECT
SP.NAM
, SP.DOB
, SP.REL
, SP.CLNTFK
, SP.HXSPOUSPK
FROM HXSPOUS SP

---------------------------
C++Builder 6
---------------------------
ISC ERROR CODE:335544569



ISC ERROR MESSAGE:

Dynamic SQL Error

SQL error code = -104

Invalid command

Data type unknown