Hi just migrated from DB2 for windows to ISeries V5 R4 and lot of queries are just not running altogether. I cant run this on ISeries although it was running on db2 for windows.
Code:
SELECT * from (select row_number() over (ORDER BY GENLAYERSSRNO ASC) AS s_no, a.GENMAXAMT,a.GENMINAMT
,a.GENLAYERSSRNO,
UPPER(b.GENCURRCODE
)
FROM TST.UWFTRTYLAYER
as a
INNER JOIN TST.UWFTRTYSTP as b
on a.genfortreatysrno=b.genfortreatysrno
where a.genfortreatysrno=74) t
;
[SQL0255] Function not supported for query. Cause . . . . . : The reason code is 6:
The reason code is 6: -- Code 1 -- Scalar subselects and lateral correlation from a nested table expression are not allowed with distributed files. -- Code 2 -- Error occurred while using a temporary distributed file. -- Code 3 -- EXCEPT or INTERSECT not supported for this query. -- Code 4 -- A sequence reference is not supported with distributed files. -- Code 5 -- A recursive common table expression is not supported for this query. --
Code 6 -- An OLAP function is not supported for this query. -- Code 7 -- ORDER OF is not supported for this query. -- Code 8 -- Scalar fullselect is not supported for this query. -- Code 9 -- A distributed file is being processed in a multi-thread capable job or this is not the initial thread. Recovery . . . : A list of corrective actions follow: -- If code 1, change the query so it does not use scalar subselects or correlation from a nested table expression. -- If code 2, see the previous messages for more information. -- If code 3, remove EXCEPT or INTERSECT from the query. -- If code 4, remove the sequence reference from the query. -- If code 5, remove the recursive common table expression from the query. -- If code 6, remove the OLAP function from the query. -- If code 7, remove the ORDER OF from the query. -- If code 8, respecify the query without a fullselect. -- If code 9, do not use multiple threads to run the query.
Seems like upper and join dont go together. Any clue guys ?