This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Exception:com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: W Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Exception:com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: W" Watch "Exception:com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: W" New topic
Author

Exception:com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: W

Raj Shan
Ranch Hand

Joined: Sep 04, 2006
Posts: 65
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.

Exception:com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: WITH;IRST 10000 ROWS ONLY;)
Raj Shan
Ranch Hand

Joined: Sep 04, 2006
Posts: 65
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"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception:com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: W
 
Similar Threads
Resultset with million rows
CachedRowSet - Stored Procedure
Free DB2 forum - SQL error with rownumber() over
Error Code
DB2 SQL error: SQLCODE: -8002