Did you try using the BATCH <http://orientdb.com/docs/2.0/orientdb.wiki/SQL-batch.html> mode? Something like this may work:
begin let cnt = SELECT count(*) from containerUPDATE container INCREMENT position = $cntcommit retry 100 iZzeT On Saturday, May 16, 2015 at 5:41:00 PM UTC+3, Jonathan Kienzle wrote: > > Hello, > > I'm looking for a way to use the result of a count sub query as the > argument to an update increment statement. > What I currently have is a query like this: > > UPDATE container INCREMENT position = (SELECT count(*) from container) > > Unfortunately it leads to the following error: > java.lang.ClassCastException: > com.orientechnologies.orient.core.sql.filter.OSQLFilterItemField cannot be > cast to java.lang.Number > > I'm using OrientDB 2.0.8. > Any ideas on how I could use a sub query count result inside an increment > statement? > > Best regards, > Jonathan > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
