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.  expresing grouping in W3c XQuery?

    Posted Fri August 30, 2002 03:50 PM

    Is it possible to express functionality of group by statement known from Sql? If it is possible please provide some examples.


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: expresing grouping in W3c XQuery?

    Posted Sat August 31, 2002 01:00 PM

    There’s no direct equivalent to group-by in the current XQuery draft, though there is still a possibility it will get in before version 1.0 is finalized.

    Meanwhile you effectively have to hand-code it using the xf:distinct-nodes and xf:distinct-values functions.

    Michael Kay


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: expresing grouping in W3c XQuery?

    Posted Tue February 18, 2003 10:57 PM

    Can you post a simple example of XQuery code
    that would utilize xf:distinct-values and function as a ‘GROUP BY’ statement?


    #Tamino
    #API-Management
    #webMethods


  • 4.  RE: expresing grouping in W3c XQuery?

    Posted Wed February 19, 2003 11:37 AM

    The spec is still fluid in this area, and I haven’t checked exactly what’s implemented in QuiP or in Tamino 4.1, but the following gives the idea:

    for $i in distinct-values(//employee/deparment/name)
    return

    { for $e in //employee
    where $e/department/name = $i
    return $e
    }


    I hope this helps!

    Michael Kay


    #Tamino
    #webMethods
    #API-Management