webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Retrieve the data in two collections

  • 1.  Retrieve the data in two collections

    Posted Thu December 19, 2002 10:25 AM

    Suppose I have two collections under a database
    One is (A)

    Eric
    xxsfs



    Another is (B)



    Haha

    Eric








    How can I make the query in these two collections just like SQL in two tables
    select A.password from A,B where B.UserGroupName = ‘HAHA’ ??


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: Retrieve the data in two collections

    Posted Tue January 14, 2003 08:33 AM

    Hi,
    this will be very easy with the query language XQuery (formerly called XML Query by the W3C) which is available in Tamino 4.1 and above. You can specify inner and outer joins and do exactly what you asked for. In the “Welcome To Tamino” demo application “First Steps” (available on IE browsers only) you will find an example for such a XQuery. There you have two docnames named “property” and “person” in the collection RealEstate and the query reads:

    for $p in input()/property
    let $x := $p/@contactPerson
    for $q in input()/person
    where $p/@category=‘Sell’ and $x = $q/@id
    return $q

    This will look into “property” and retrieve the ID of the contactPerson and will look up the details for this ID in “person”.
    Hope that helps
    GErald


    Gerald Ristow
    Tamino R&D


    #API-Management
    #webMethods
    #Tamino