Probably, it also may be that typeId is empty somewhere. If this ok you
should filter such values before performing index-scan.


Ok. So it means that $typeId contains multiple values somewhere. Or in other
> words there customers which have multiple type IDs. Is it ok?
>
> If it is, then you should slightly change query since index-scan doesn't
> work with multiple values at a time.
>
> For example something like this:
>
>     ...
>
>     let $typeIds := $element/CustomerTypeId/text()****
>
>     let $type  := for $typeId in $typeIds
>
>                   return index-scan("CustomerTypeIndex", $typeId,
> "EQ")/Name/text()
>
>     ...
>
>
>
> On Thu, Aug 4, 2011 at 12:20 AM, Malcolm Davis <malc...@nuearth.com>wrote:
>
>> Query execution failed (SEDNA Message: ERROR XPTY0004 It is a type error
>> if,
>> during the static analysis phase, an expression is found to have a static
>> type that is not appropriate for the context in which the expression
>> occurs,
>> or during the dynamic evaluation phase, the dynamic type of a value does
>> not
>> match a required type as specified by the matching rules in 2.5.4
>> SequenceType Matching. Details: Value argument of index-scan is not a
>> single
>> sequence. Query line: 7, column:19 ).
>>
>> -----Original Message-----
>> From: Ivan Shcheklein [mailto:shchekl...@gmail.com]
>> Sent: Wednesday, August 03, 2011 3:15 PM
>> To: Malcolm Davis
>> Cc: sedna-discussion@lists.sourceforge.net
>> Subject: Re: [Sedna-discussion] index-scan binding fails with ERROR
>> XPTY0004
>>
>> Hi Malcolm,
>>
>>
>>
>>        Am I missing something?  Can an index-scan be used when trying to
>> bind 2 documents together?
>>
>>
>> Sure, it can.
>>
>> Please, send us full error message (if you don't use command line get
>> error
>> details from the event logs).
>>
>>
>> Ivan Shcheklein,
>> Sedna Team
>>
>>
>
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to