First of all, I am new to DB2 (3 weeks). I want to update a TEST table with PRODUCTION table in a nested select with read only with uncommitted read.
and i got following error:
Please let me know if it is possible to do what I was trying to achieve. Thanks in advance!
UPDATE TEST_STAFF S2
SET DEPT = (SELECT DEPT from PRODUCTION_STAFF
WHERE JOB = S2.JOB
ORDER BY DEPT
FETCH FIRST 1 ROWS ONLY
READ ONLY WITH UR );
and i got following error:
ERROR [42601] [IBM][DB2/NT] SQL0104N An unexpected token "FETCH FIRST 1 ROWS" was found following "ORDER BY DEPT". Expected tokens may include: "<space>". SQLSTATE=42601
Please let me know if it is possible to do what I was trying to achieve. Thanks in advance!