-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query sometimes fails with "not in aggregate function or gr"
PostPosted: Wed May 06, 2009 9:01 am 
Newbie

Joined: Sat Nov 29, 2008 8:35 pm
Posts: 5
I can't figure out why this query works sometimes and fails other times (forgive the grails syntax):

Code:
def total = TestOutcome.executeQuery("select t.analysisState, count(t.analysisState) from cuanto.TestOutcome t where t.testRun = ? group by t.analysisState""", [testRun])


When it works, it works fine, when it fails, I get this error:

Code:
util.JDBCExceptionReporter  - Not in aggregate function or group by clause: org.hsqldb.Expression@647a7347 in statement [select testoutcom0_.analysis_state_id as col_0_0_, count(testoutcom0_.analysis_state_id) as col_1_0_, analysisst1_.id as id7_, analysisst1_.version as version7_, analysisst1_.is_analyzed as is3_7_, analysisst1_.is_bug as is4_7_, analysisst1_.is_default as is5_7_, analysisst1_.name as name7_ from test_outcome testoutcom0_ inner join analysis_state analysisst1_ on testoutcom0_.analysis_state_id=analysisst1_.id where testoutcom0_.test_run_id=? group by testoutcom0_.analysis_state_id]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.