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.  avg() problem

    Posted Thu July 12, 2001 02:15 PM

    I’ve got a problem running Q12 from http://www.w3.org/TR/xquery/

    # XQuery 1.0: (Q12) List each publisher and the average price of its books.

    FOR $p IN distinct(document(“bib.xml”)//publisher)
    LET $a := avg(document(“bib.xml”)//book[publisher = $p]/price)
    RETURN

    {$p/text()}
    {$a}

    The avg function produces an 0 when a price element contains a decimal value (for example 45.99). Is this an “unlisted limitation” or (…)?

    Sample output:

    xql:result


    PTR PH

    0



    Addison Wesley

    63

    </xql:result>


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: avg() problem

    Posted Thu July 12, 2001 04:19 PM

    yes, I am sorry, this is one of the ‘unlisted limitation’.
    Currently Quip just understands Integer values.
    Sven Eric


    #Tamino
    #API-Management
    #webMethods