"eq" vs. "="

What are the use cases for "eq" vs. "=" ?
What would be the difference between:
$person/t:PersonName/t:PersonSurName eq "CCH"
vs.
string ( $person/j:PersonName/j:PersonSurName ) eq "CCH"
vs.
$person/j:PersonName/j:PersonSurName = "CCH"
The first case reports "Type incompatible error"

$person/j:PersonName/j:PersonSurName is not a string - it is an element of type
string.
From http://www.awprofessional.com/articles/article.asp?p=100667&seqNum=6
"XQuery provides two sets of comparison operators. The general comparison operators,
=, !=, >, >=, <, and <=, which are inherited from XPath Version 1, have an implied
existential quantifier on both operands. For example, the expression A = B, if
A and B are sequences of multiple values, returns true if some item in sequence
A is equal to some item in sequence B. If either of their operands is an empty
sequence, the general comparison operators return false. "
"XQuery also provides a set of value comparison operators, eq, ne, gt, ge, lt,
and le, which require both of their operands to consist of exactly one atomic
value. "
"Benjamin Shrom" <[email protected]> wrote:
>
What are the use cases for "eq" vs. "=" ?
What would be the difference between:
$person/t:PersonName/t:PersonSurName eq "CCH"
vs.
string ( $person/j:PersonName/j:PersonSurName ) eq "CCH"
vs.
$person/j:PersonName/j:PersonSurName = "CCH"
The first case reports "Type incompatible error"

Similar Messages

Maybe you are looking for

  • How do I get my iPhone 5 to stop automatically launching Music when plugged into my car USB port?

    For quite some time, my iPhone has been set to automatically launch Music -- on the first song listed alphabetically -- as soon as I plug it into my car's USB port, which I use both for connectivity and for charging. It's enough to have made me hate

  • Production Variances in COPA   CO-PA

    Hi Gurus Production variances are genrated in COPA at the time of Prod Order Settlement.How can we display these in COPA reports apportioned according to Products If not what is the best practice to present Production Variances in COPA reports

  • Deprecated methods in java.lang.thread

    Hi, I am getting the followng warning message when i run my code: The method void stop() in class java.lang.Thread has been deprecated, can anyone suggest an alternative method to the deprectaed stop method, i can't seem to find one. Thanks in advanc

  • Eq settings on a first generation 10 GB ipod

    How do I turn the EQ setting on and how do I turn the Bass Boster on, on my 1st generation ipod?

  • Deploy to production (best practices)

    I am wondering if there are some best practices published somewhere in regard to deploying an app from your dev environment to a production environment? I currently do the following. 1) export/inport application 2) generate a sync script (toad) to ge