IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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
  • 1.  Complex 'WHERE' clause

    Posted Thu December 30, 2004 11:34 AM

    As I’m new to XQuery and Timano I’ve run into a bit of a problem, and I’m not able to find a suitable answer.

    Here’s the deal:

    We’ve stored several documents within the Tamino Database, looking somewhat like this :





    Something


    1
    link
    5


    2
    link
    3





    This article has a specific category type, but is referenced by different higher entities. I need to have an overview of ARTICLEs that meet three criteria :

    1. First of all a specific Category type
    2. A certain Link number and 3. Whithin that same Link a specific Position

    The query I’ve been given is the following :

    for $a in input()/ARTICLE where $a//INFO/CATEGORY/TYPE=“Something” and $a//INFO/LINK/NR=“2” and $a//INFO/LINK/POSITION=“5” return $a

    Obviously this doesn’t work as it gives back all ARTICLES with a node that holds the value “2” and a tag that holds the value “5”. But I need the ARTICLES that have these values within a single node.

    I’m kind of desperate, so please help me out here.


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: Complex 'WHERE' clause

    Posted Thu December 30, 2004 05:14 PM

    Does this help:

    for $a in input()/ARTICLE  
    for $b in $a/DESCRIPTION/INFO/LINK
    where $a/DESCRIPTION/INFO/CATEGORY/TYPE="Something"
    and  $b/NR = '2' and $b/POSITION = '5'
    return $a

    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: Complex 'WHERE' clause

    Posted Mon January 10, 2005 01:43 PM

    Thanks for the example. It worked like a charm !


    #API-Management
    #webMethods
    #Tamino