Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I am getting error likeSQLCODE: -104, SQLSTATE: 42601

 
sachin pate
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using following query
INSERT INTO IIS.ADMIN_AUDIT(ACCESS_USER,ACCESS_TIME,ACCESS_TYPE,FUNCTION,ACTION_INFO)
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this really is the entire statement you're executing, then you're missing the values to insert - either the VALUES clause, or the SELECT clause.
 
Harneet Singh
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree with MARTIN , an INSERT statement is incomplete without the VALUES , unless you have not posted entire query.
 
sachin pate
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

INSERT INTO IIS.AUDIT
(
ACCESS_USER,
ACCESS_TIME,
ACCESS_TYPE
)
VALUES (
's12345',
CURRENT TIMESTAMP,
'GET PART INFORMATION'
);
console output as follows

[9/29/13 13:41:22:806 GMT+05:30] 00000020 SystemErr R com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ;;INFORMATION'
);END-OF-STATEMENT
[9/29/13 13:41:22:806 GMT+05:30] 00000020 SystemErr R at com.ibm.db2.jcc.b.id.e(id.java:1640)
[9/29/13 13:41:22:806 GMT+05:30] 00000020 SystemErr R at com.ibm.db2.jcc.b.id.b(id.java:1197)
[9/29/13 13:41:22:806 GMT+05:30] 00000020 SystemErr R at com.ibm.db2.jcc.c.fb.i(fb.java:234)
[9/29/13 13:41:22:806 GMT+05:30] 00000020 SystemErr R at com.ibm.db2.jcc.c.fb.b(fb.java:50)

Please let me i am doing wrong.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this command work when run from an SQL client? And if it does, can you post the Java code that executes it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic