Namaste ,
and operator in predicates seems tobe not working.
my xquery is as below and xml is attached herewith.
declare namespace UDF="TallyUDF"; let $fromdate:=20170228 let $todate:=20170228 let $pledger_code:=57 let $pledger_status:="P" for $allitems in db:open('10096',"Vouchers")/ENVELOPE/Voucher[./Date/text()
= $fromdate and ./Date/text() <= $todate and
./AllLedgerEntries.LIST/UDF:AsPerListAllocations.LIST/UDF:ColPartyCode.LIST/UDF:ColPartyCode/text()= $pledger_code and
./AllLedgerEntries.LIST/UDF:AsPerListAllocations.LIST/UDF:MaheshCIFlag.LIST/UDF:MaheshCIFlag/text()= $pledger_status] return $allitems/MasterId
Expected 2 records/nodes instead 4. Tushar Deshmukh,
Namaste Tushar,
if you write to the list, please provide working examples. None of the XML files has a "Voucher" element. Apart from that, it is always helpful if you could first try to simplify your query and e.g. check if the behavior you describe can also be reproduced with a single document.
Thanks in advance, Christian
On Thu, Mar 23, 2017 at 1:07 PM, Tushar Deshmukh tdlwala@gmail.com wrote:
Namaste ,
and operator in predicates seems tobe not working.
my xquery is as below and xml is attached herewith.
declare namespace UDF="TallyUDF"; let $fromdate:=20170228 let $todate:=20170228 let $pledger_code:=57 let $pledger_status:="P" for $allitems in db:open('10096',"Vouchers")/ENVELOPE/Voucher[./Date/text()
= $fromdate and ./Date/text() <= $todate and
./AllLedgerEntries.LIST/UDF:AsPerListAllocations.LIST/UDF:ColPartyCode.LIST/UDF:ColPartyCode/text()= $pledger_code and
./AllLedgerEntries.LIST/UDF:AsPerListAllocations.LIST/UDF:MaheshCIFlag.LIST/UDF:MaheshCIFlag/text()= $pledger_status] return $allitems/MasterId
Expected 2 records/nodes instead 4. Tushar Deshmukh,
basex-talk@mailman.uni-konstanz.de