I am trying to run this SQL against the AS/400 db2 database in a crystal report, I am getting an error
FAILED TO RETREIVE DATA FROM THE DATABASE" Details 42000 IBM ISeries ACCESS ODBC Driver DB2 UDB SQL0104 Token Not valid. Valid tokens <End of Statement> Database Vendor code 104
(SELECT LMLTPC, COALESCE(IRLOC1,'') as IRLOC1, COALESCE(IRLOC2,'')
as IRLOC2, COALESCE(IRLOC3,'') as IRLOC3, IRPRT#, IRQOH#, IRWHS#,
'' as IEPRT#, '.00' as IEQOH#, '' as IELOC1, '' as IELOC2, '' as
IELOC3, '' as IEWHS#
FROM
(SELECT LMLTPC, LMLOC1, LMLOC2, LMLOC3 FROM ASTDTA.ICLOCMLM WHERE
LMLTPC='PAL') t1
left outer join
(SELECT IRLOC1, IRLOC2, IRLOC3, IRPRT#, IRQOH#, IRWHS# FROM
ASTDTA.ICBLDTIR ) t2
On LMLOC1=IRLOC1 AND LMLOC2=IRLOC2 AND LMLOC3=IRLOC3 )
UNION ALL
(SELECT ' ' as LMLTPC, ' ' as IRLOC1, ' ' as IRLOC2, ' ' as IRLOC3,
'' as IRPRT#, '.00' as IRQOH#, '' as IRWHS#, IEPRT#, IEQOH#, IELOC1,
IELOC2, IELOC3,
IEWHS# FROM ASTDTA.ICBALMIE) )