"Unexpected token" in a DB2 SQL statement that runs OK in Postgres
The problem is in the FOR READ ONLY statement. DB2 implicitly add's the same effect for all nested query's, and FOR READ ONLY makes it ambiguous. However, i dunno why i getting so strange error message.