Hello,
I am trying to run some Xqueries from command line but I am getting the following error:
 
$ java -cp "C:\Program Files\BaseX\BaseX.jar" org.basex.BaseXClient -Uadmin -Pa
dmin  -c"open dbname;xquery <results>{ let $total:=count(//callRecords/*) return <t
otal>{$total}</total>}</results>"
Error: Stopped at line 1, column 30:
[XPST0003] Expecting "}", found ":".
 
If I run the query from the GUI it runs correctly, but here I am always getting this error.
 
I tried running other dummy queries that work in the GUI but here I get an error like this:
$ java -cp "C:\Program Files\BaseX\BaseX.jar" org.basex.BaseXClient -Uadmin -Pa
dmin  -c"open dbname;xquery let $total := count(//callRecords/*) return $total"
Error: Stopped at line 1, column 23:
Syntax: XQUERY [query]
  Evaluate XQuery.
 
 
 
Any idea of how to solve this?
Is it possible to use let in queries from command?
 
Thanks in advance for your help.
Hector