My very first query in IBM portal :)
Am trying to execute xquery from putty.
Tried xquery using PATH which worked but the same using FLWR not working.
db2-fn:xmlcolumn('CLIENTS.CONTACTINFO')/Client/fax" --> worked
for $y in db2-fn:xmlcolumn('CLIENTS.CONTACTINFO')/Client/fax
return $y" --> not working, below is the error
An XQuery expression has an unexpected token "in" following "for ".
Expected tokens may include: "is". Error QName=err:XPST0003. SQLSTATE=10505
Please help me, learning xqueries and got stuck. :(
Pinned topic Xquery: problem when using FLWR rule
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-12-15T05:20:38Z at 2011-12-15T05:20:38Z by SystemAdmin
Henrik_Loeser 270001HQ5337 Posts
Re: Xquery: problem when using FLWR rule2011-12-14T13:45:34ZThis is the accepted answer. This is the accepted answer.Did you try to escape the $ sign, e.g.:
for \$y in db2-fn:xmlcolumn('CLIENTS.CONTACTINFO')/Client/fax
Depending on the shell it tries to replace variables.
Read more about DB2 in my blog at http://blog.4loeser.net