SELECT FOR FETCH ONLY not working in DB2 Mode.
Our production database is DB2 and we are using h2 for unit testing. The DBA
team wanted us to append "FOR FETCH ONLY" for some select queries. However, the
query is failing in h2 database.
Query:
SELECT col1, col2 FROM table1 FOR FETCH ONLY.
Error:
Syntax error in SQL statement "SELECT col1, col2 FROM table1 FOR FETCH[*] ONLY
"; SQL statement:
SELECT col1, col2 FROM table1 for fetch only [42000-147] {SELECT col1, col2
FROM table1 for fetch only} [code=42000, state=42000];
Expected Output:
Successful execution of query
Operating System:
Windows XP
h2 Version:
1.2.147
WorkAround:
Trim off FOR FETCH ONLY for test
Use Case:
Suggestion from DBA; feature supported in DB2.
Priority:
High
Original issue reported on code.google.com by sud...@gmail.com on 22 Mar 2011 at 7:04
Original issue reported on code.google.com by
sud...@gmail.com
on 22 Mar 2011 at 7:04