XQuery equivalent to NOT IN (subquery)

Discussion in 'XML' started by thecolour, Jun 26, 2007.

  1. thecolour

    thecolour Guest

    Hello all

    I am looking for the XQuery exquivalent to something like

    select field from table1 where field not in (select field from table2)

    I have been trying the != operator but it's not what I'm looking for.

    Many thanks
    Tom
     
    thecolour, Jun 26, 2007
    #1
    1. Advertising

  2. thecolour wrote:

    > I am looking for the XQuery exquivalent to something like
    >
    > select field from table1 where field not in (select field from table2)


    /table1/field[not(. = /table2/field)]

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jun 26, 2007
    #2
    1. Advertising

  3. thecolour

    thecolour Guest

    On 26 Jun, 13:57, Martin Honnen <> wrote:
    > thecolour wrote:
    > > I am looking for the XQuery exquivalent to something like

    >
    > > select field from table1 where field not in (select field from table2)

    >
    > /table1/field[not(. = /table2/field)]
    >
    > --
    >
    > Martin Honnen
    > http://JavaScript.FAQTs.com/


    Thanks very much Martin - that worked a treat!
     
    thecolour, Jun 26, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod
    Replies:
    6
    Views:
    8,797
  2. .Net Sports

    SQL Subquery and alias for datagrid use

    .Net Sports, Jul 6, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    700
    =?Utf-8?B?bWFyc2hhbA==?=
    Jul 7, 2005
  3. Replies:
    0
    Views:
    570
  4. Bogdan
    Replies:
    3
    Views:
    420
    George Ter-Saakov
    Apr 16, 2008
  5. S Perryman
    Replies:
    3
    Views:
    1,428
    Martin Honnen
    Feb 11, 2009
Loading...

Share This Page