Set Equality

Help
xquery
2006-03-20
2013-03-11
  • xquery
    xquery
    2006-03-20

    By: John Mikich - mindjoy
    Inconsistency in dbXQuery Query Editor  
    2006-03-17 12:11 
    Hi there,

    Your nifty product caught my attention, I like it very much, however, I found some peculiarities in dbXQury editor, as follows.
    I use an Oracle database to execute XQuery against. If I run something like:

    let $articles := collection('WM20OracleDev:NWCS.NWCS_ARTICLE')/NWCS_ARTICLE

    return $articles[ARTICLE_ID <= 1002]

    I am getting good result (records with ARTICLE_IDs 1000, 1001, 1002.
    However, if I run:

    let $articles := collection('WM20OracleDev:NWCS.NWCS_ARTICLE')/NWCS_ARTICLE
    let $article-ids := (1000, 1001, 1002)

    for $id in $article-ids
    return $articles[ARTICLE_ID = $id]

    I am only getting the first record with ARTICLE_ID 1000!?

    If I run: 

    let $article-ids := (1000, 1001, 1002)

    for $id in $article-ids
    return $id

    I get 1000, 1001, 1002

    Could you please explain this inconsistency? Thank you.

    Regards,

    John Mikich
    Software Developer

     
    • xquery
      xquery
      2006-03-20

      Hmm.. on first inspection this looks like its a bug. Let me try it here and I'll see if I can recreate it and investigate the issue further.