You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@empire-db.apache.org by Daniel Weidele <da...@uni-konstanz.de> on 2015/08/10 22:44:56 UTC

MySQL with Variables

Hi friends,

is anyone aware of how to correctly use something like

db.executeSQL("SET @a:=0; UPDATE EDGE SET id=@a:=@a+1 WHERE GRAPH_ID=?;",
new Object[] { graphId }, conn);

I only receive syntax errors from within JDBC, so this isn't necessarily an
EmpireDB issue - however, I wouldn't know what to tell JDBC either.

Submitting the statement (without parameter ?, but the actual value)
directly in the data base's admin GUI works perfectly (MySQL).

Do you have any ideas whether I need to escape/configure something?

Cheers & thanks,
Daniel


-- 
*Daniel K.I. Weidele, **M.Sc. B.Sc.*
*PhD student*
*ERC Synergy-NEXUS 1492 <http://www.nexus1492.eu/>*
*Algorithmics Group*
*Department of Computer & Information Science*
*University of Konstanz*
*PO Box 67*
*78457 Konstanz*
*mobile. +49 (0)174 7275725*
*office. +49 (0)7531 88-4571*