Hi,
I have the following query which works on SQL Server
SELECT MAX(MaxValue) MaxOverAll
FROM(SELECT MAX(HISTORY.WHENHISTORY) MaxValue
FROM HISTORY
WHERE (HISTORY.READCODE = 'ZPSA10'
OR HISTORY.READCODE = '137S.00')
UNION ALL
SELECT MAX(CLASSIFICATION.WHENCLASS) MaxValue
FROM CLASSIFICATION
WHERE (CLASSIFICATION.READCODE = 'ZPSA10'
OR CLASSIFICATION.READCODE = '137S.00')
) SubQuery
I need to make this run on an interbase database but I get the following error:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 2, char 4.
SELECT.
what am i doing wrong?
Cheers,
Kevin,
I have the following query which works on SQL Server
SELECT MAX(MaxValue) MaxOverAll
FROM(SELECT MAX(HISTORY.WHENHISTORY) MaxValue
FROM HISTORY
WHERE (HISTORY.READCODE = 'ZPSA10'
OR HISTORY.READCODE = '137S.00')
UNION ALL
SELECT MAX(CLASSIFICATION.WHENCLASS) MaxValue
FROM CLASSIFICATION
WHERE (CLASSIFICATION.READCODE = 'ZPSA10'
OR CLASSIFICATION.READCODE = '137S.00')
) SubQuery
I need to make this run on an interbase database but I get the following error:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 2, char 4.
SELECT.
what am i doing wrong?
Cheers,
Kevin,