Db2 Sql Error Sqlcode=-104 Sqlstate=42601 Sqlerrmc=end-of-statement
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business db2 sql error sqlcode 104 sqlstate 42601 sqlerrmc Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation sql state=42601 db error code=-104 Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like db2 sql error sqlcode=-103 sqlstate=42604 you, helping each other. Join them; it only takes a minute: Sign up What can SQL CODE -104 (error) represent? up vote 9 down vote favorite 1 I am executing an SQL query via jcc to run
Sqlcode=-103 Sqlstate=42604
a report. When I opened the error log file for the program and examined the SQL query, everything seems to be fine (There are no extra or missing brackets, commas, etc and the syntax is good) however when I execute I am getting this error: [Report.execute()] DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=,;ATE IN (1,2,3,10,1) ;, DRIVER=4.12.55 When I researched about the SQLCODE I found out that it means there is an illegal symbol in the sqlstate = 42601 query. What can I look for to find this illegal symbol? This is the query Sorry for the tiny font but if you zoom 200% or so you can see the query better. Thanks a lot :) java sql db2 sqlcode jcc share|improve this question edited Oct 2 '15 at 8:05 Udo Held 7,49393362 asked Feb 22 '13 at 10:39 Bernice 96852352 Wouldn't it make sense for you to post the query? Someone might be able to spot the symbol for you. –Bridge Feb 22 '13 at 10:40 it is a bit long that's why I didn't post it! Well let me include it then –Bernice Feb 22 '13 at 10:41 I added the query.. –Bernice Feb 22 '13 at 10:50 add a comment| 4 Answers 4 active oldest votes up vote 9 down vote accepted You have a comma (where you shouldn't) at the end of this line: AND Tick.STATE IN (1,2,3,10,1), The following line also has the same problem. share|improve this answer answered Feb 22 '13 at 10:55 Bohemian♦ 215k38268389 1 oh! sorry I'm still new to this! I thought that wasn't bad! Thanks for your help! –Bernice Feb 22 '13 at 11:20 Simpler impossible!, thanks! –Israelm Nov 24 '14 at 18:00 add a comment| up vote 1 down vote Generally this
with a mandatory word, e.g. keyword2 keyword1 +keyword2 Questions excluding a word, e.g. keyword2 keyword1 -keyword2 Questions with a specific tag and keyword(s) +[tag1] keyword1 Questions with two or db2 sql error sqlcode 204 sqlstate 42704 sqlerrmc more specific tags and keyword(s) +[tag1] +[tag2] keyword1 To search for all
Db2 Sql Error Sqlcode 302 Sqlstate 22001 Sqlerrmc Null
posts by a user or all posts with a specific tag, start typing and choose from the suggestion
Com.ibm.db2.jcc.am.sqlsyntaxerrorexception: Db2 Sql Error: Sqlcode=-104, Sqlstate=42601
list. Tags Spaces API Connect Appsecdev BPM Blockchain Bluemix CICS Cloud Analytics Cloud marketplace Content Services (ECM) Continuous Testing Courses DB2 LUW DataPower Decision Optimization DevOps Services Digital Experience Hadoop IBM http://stackoverflow.com/questions/15022206/what-can-sql-code-104-error-represent Design IIDR ITOA InformationServer Integration Bus Internet of Things LinuxONE Mainframe Messaging Node.js ODM Open Predictive Analytics PureData for Analytics Push Run Book Automation Storage Streamsdev Swift UrbanCode WASdev WSRR Watson dW Answers Help dW Premium developerWorks Team Watson Health More Users Badges Ask a question This question was closed Jan 22 at 04:09 PM by Bill Wentworth for the following reason: https://developer.ibm.com/answers/questions/28715/insert-error-in-db2-through-jdbc.html The question is answered, right answer was accepted Insert error in db2 through jdbc Question by vishalaksh ( 24) | Oct 13, 2014 at 12:47 PM bluemixdashdbjdbcanalyticswarehouse I have an insert query in db2. The problem is that it gets completed successfully when I run it from dbvisualizer. But when I run the same from my java web app, it gives error. query: INSERT INTO BLU00000."TABL5" ( "col1", "col2", "col3", "col4", "col5", "Start Date", "End Date", "col 8", "col 9", "col 10", "Created Date") VALUES ('', ' ', '', '', '', DATE(2014-10-13), DATE(2014-10-20), '', ' ', '', DATE(2014-10-13)); error: [err] com.ibm.db2.jcc.am.ro: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=;;', DATE(2014-10-13));END-OF-STATEMENT, DRIVER=3.58.82 [err] at com.ibm.db2.jcc.am.ed.a(ed.java:676) [err] at com.ibm.db2.jcc.am.ed.a(ed.java:60) [err] at com.ibm.db2.jcc.am.ed.a(ed.java:127) [err] at com.ibm.db2.jcc.am.tm.c(tm.java:2523) [err] at com.ibm.db2.jcc.am.tm.d(tm.java:2511) [err] at com.ibm.db2.jcc.am.tm.b(tm.java:1931) [err] at com.ibm.db2.jcc.t4.fb.h(fb.java:221) [err] at com.ibm.db2.jcc.t4.fb.b(fb.java:47) [err] at com.ibm.db2.jcc.t4.t.b(t.java:38) [err] at com.ibm.db2.jcc.t4.ub.h(ub.java:114) [err] at com.ibm.db2.jcc.am.tm.eb(tm.java:1926) [err] at com.ibm.db2.jcc.am.tm.a(tm.java:3017) [err] at com.ibm.db2.jcc.am.tm.c(tm.java:696) [err] at com.ibm.db2.jcc.am.tm.executeUpdate(tm.java:680) I am using db2 as a service on Analytics warehouse on bluemix. People who like this Close 0 Comment 10 |3000 characters needed characters left characters exceeded Viewable by all
your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start http://www.dbforums.com/showthread.php?1094285-DB2-SQL-error-SQLCODE-104-SQLSTATE-42601-SQLERRMC viewing messages, select the forum that you want to visit from the selection below. Results 1 to 10 of 10 Thread: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: Tweet Thread Tools Show Printable https://www.zabbix.com/forum/showthread.php?t=38151 Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 01-19-05,23:21 #1 sandhyab View Profile View Forum Posts Registered User Join Date Jan db2 sql 2005 Posts 11 Unanswered: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: Iam getting this errror while using jcc connectivity.All my sql statements are simple select statements.Can you please tell what i shd do to solve this error? Thanks in Advance San Reply With Quote 01-19-05,23:39 #2 Marcus_A View Profile View Forum Posts Registered User Join Date May 2003 Location USA db2 sql error Posts 5,737 What does the Messages and Codes manual say about this? You can download the manuals from the IBM site (see Useful DB2 Stuff thread). M. A. Feldman IBM Certified DBA on DB2 for Linux, UNIX, and Windows IBM Certified DBA on DB2 for z/OS and OS/390 Reply With Quote 01-20-05,00:11 #3 sandhyab View Profile View Forum Posts Registered User Join Date Jan 2005 Posts 11 Thanks for your reply. I checked the sql error in manuals but i didnot understand it. I am getting the following error on this sql statement: Select POLNUM,ACTION,MEMONUM FROM POLMEMO WHERE POLNUM='12239598 'AND MEMONUM = (SELECT MAX(MEMONUM) FROM POLMEMO WHERE POLNUM='12239598 '); Exception in ROLE OR POLMASTN dbconnB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ;;POLNUM='12239598 ');END-OF-STATEMENT Any suggestions would be appreciated. Reply With Quote 01-20-05,00:15 #4 Marcus_A View Profile View Forum Posts Registered User Join Date May 2003 Location USA Posts 5,737 I don't know anything about jcc, but it looks like there may be a problem with the statement termination character. M. A. Feldman IBM Certified DBA on DB2 for Linux, UNIX, and Windows IBM Certified DBA on DB2 for z/OS and OS/390 Reply With Quote 01-20-05,01:28 #5 sandhyab View Profile View Forum Posts Registered U
List Search Forums Show Threads Show Posts Tag Search Advanced Search Go to Page... Thread Tools Display Modes #1 05-12-2012, 01:01 zaicnupagadi Junior Member Join Date: Dec 2010 Posts: 28 Problem with monitoring DB2 with dbforbix Hi all, We are struggling to force working our dbforbix with DB2 database (TSM 6) We are receiving a strange error in dbforbix.log: 2012-12-05 00:53:37,767 [main] ERROR DBforBIX - Error on Configurator for database DB2DB5 -->DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: END-OF-STATEMENT;SELECT SYSTEM_USER;