• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB2 error in Linux - Unexpected Token code=-104 and status=42601

 
Raj Metha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all db2 gurus,
I am very new to db2. I am doing a java project which updates db2 using jdbc. Ok my update command will be like

UPDATE TbNme set acsright = ?, set userid =?, set dte =? where grp=? and acs=?

I will create a PreparedStatement and send the parameters. When executing i am getting db2exception :[IBM][CLI Driver][DB@] SQL0104N An Unexpected token "USERID" was found following "". Expected "=". code :-104 and status = 42601.

Anybody can help me. Thanks in advance.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raj,
You can only have one "set" keyword in the query. Try:
UPDATE TbNme set acsright = ?, userid =?, dte =? where grp=? and acs=?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm used to:



Hi Jeanne, that happens, because I first had to start the database, to test my expection, which produced a new question, which I wrote first...
[ October 12, 2004: Message edited by: Stefan Wagner ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic