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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How do I use the max() min() and sum() functions with the Ja

  • 1.  How do I use the max() min() and sum() functions with the Ja

    Posted Thu October 17, 2002 06:32 PM

    using xql I can do the following and get the max value for the DocID element.

    _xql=max(/Document/DocID)
    result in browser.
    xql:result169034</xql:result>

    What is the syntax from the Java layer. I tried the following, but no data is retreived. I know the query code is working because I can do other queries.
    query(“max(/Document/DocID)”)

    Your help is appreciated.

    Andy


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 2.  RE: How do I use the max() min() and sum() functions with the Ja

    Posted Thu October 17, 2002 07:07 PM

    Hi Andy,

    I think that the easiest way to get the result of a function is to use the method
    getQueryContentAsString() of the TResponse object.

    For example:

        // create tquery object from xml string
    TQuery query = TQuery.newInstance("max(/Document/DocID)");
    
    // Invoke the query operation and obtain the response
    response = accessor.query(query);
    
    System.out.println("Max: " + response.getQueryContentAsString());



    Cheers,
    Trevor.


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 3.  RE: How do I use the max() min() and sum() functions with the Ja

    Posted Fri October 18, 2002 12:22 PM

    Thank you, that make sense. I will give it a try.

    Andy


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 4.  RE: How do I use the max() min() and sum() functions with the Ja

    Posted Fri October 18, 2002 04:33 PM