I am trying to execute DELETE FROM (SELECT * FROM table WHERE DATE(column) > DATE(CURRENT_DATE - 60 DAYS) FETCH FIRST 10000 ROWS ONLY WITH UR). I am getting the below error. I am using db2 jcc jar file. Can someone provide me what exactly is causing this issue. It says some token or character or clause is issue.
It got resolved. "with UR" should be for Delete. In the below query it was within select statement. The working query is "DELETE FROM (SELECT * FROM table WHERE DATE(column) > DATE(CURRENT_DATE - 60 DAYS) FETCH FIRST 10000 ROWS ONLY) WITH UR"