Aggregate functions - Still no luck

From: Chumbo (srdan.ivkovi..bst.com)
Date: Sat Oct 25 2003 - 01:58:34 EDT

  • Next message: Andrus Adamchik: "Re: Aggregate functions - Still no luck"

    Andrus..

    I'm afraid it's still no go.. to make matters even worse the following
    lines

    ----------
    Expression test = ExpressionFactory.unaryExp(
            Expression.MIN,
            "contId");
            
    SelectQuery query = new SelectQuery(contact.class,test);
    ----------

    don't even evaluate to sql like

    select min(contId) from contact

    instead I get this debug output

    -----------
    12372 [AWT-EventQueue-0] WARN access.QueryLogger - SELECT t0.contId,
    t0.contName, t0.contType, t0.line1, t0.line2, t0.line3, t0.line4,
    t0.link, t0.linkId, t0.recordStatus, t0.usage FROM contact t0 WHERE ?
    [bind: 'contId'] - prepared in 102 ms.
    12832 [AWT-EventQueue-0] WARN access.QueryLogger - *** error.
    java.sql.SQLException: General error in statement [SELECT t0.contId,
    t0.contName, t0.contType, t0.line1, t0.line2, t0.line3, t0.line4,
    t0.link, t0.linkId, t0.recordStatus, t0.usage FROM contact t0 WHERE
    'contId']
    ------------

    am I doing something wrong here...

    many thanks for your help..

    Srdan



    This archive was generated by hypermail 2.0.0 : Sat Oct 25 2003 - 01:57:18 EDT