• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?


  • Subject: Re: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?
  • From: Pascal Robert <email@hidden>
  • Date: Sat, 11 Jun 2011 06:18:20 -0400

Are you calling straight SQL or does that call was made with ERXControlUtilities aggregate methods? You can't do a count(*) and having all attributes listed after, that's why you are getting the "must appear in the GROUP BY clause" error.

> Hi List,
>
> this is a strange one:
> - allianceID is nullable.
> Any idea what the problem here might be?
>
> 	atze
>
>
> JDBCAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.PostgresqlExpression: "SELECT count(*), t0.allianceID, t0.alliancePermission, t0.comment, t0.creationDate, t0.deletionDate, t0.gold, t0.id, t0.lastReadForumDate, t0.lastReadReportDate, t0.loginId, t0.nick, t0.points, t0.rank FROM Player t0 WHERE t0.allianceID = ?::int4" with
> Bindings: 1:71(allianceID)>:
>    Next exception:SQL State:42803 -- error code: 0 -- msg: ERROR: column "t0.allianceid" must appear in the GROUP BY clause or be used in an aggregate function
>  Position: 18
>  at com.webobjects.jdbcadaptor.JDBCContext._jdbcErrorWithChannel(JDBCContext.java:170)
>     ... skipped 7 stack elements
>  at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
>  at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
>  at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1206)
>     ... skipped 1 stack elements
>  at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsForSourceGlobalID(EOObjectStoreCoordinator.java:634)
>  at com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID(EOEditingContext.java:3923)
>  at er.extensions.eof.ERXEC.objectsForSourceGlobalID(ERXEC.java:1169)
>     ... skipped 1 stack elements
>  at com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfObject(EOAccessArrayFaultHandler.java:77)
>  at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutableArray.java:39)
>  at com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMutableArray.java:96)
>  at com.webobjects.foundation.NSArray.size(NSArray.java:1026)
>  at com.xyrality.bk.eo.Alliance.publicPropertyList(Alliance.java:84)
>  at com.xyrality.bk.eo.Player.publicPropertyList(Player.java:249)
>  at com.xyrality.bk.eo.Habitat.publicPropertyList(Habitat.java:1187)
>  at com.xyrality.bk.core.MapTile.propertyList(MapTile.java:54)
>     ... skipped 10 stack elements
>  at com.xyrality.bk.actions.MapAction.map(MapAction.java:71)
>  at com.xyrality.bk.actions.MapAction.mapAction(MapAction.java:57)
>     ... skipped 3 stack elements
>  at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:144)
>  at er.extensions.appserver.ERXDirectAction.performActionNamed(ERXDirectAction.java:401)
>  at com.xyrality.bk.actions.BKDirectAction.performActionNamed(BKDirectAction.java:84)
>     ... skipped 6 stack elements
>  at com.xyrality.bk.Application.dispatchRequest(Application.java:63)
>  ... skipped 3 stack elements
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?
      • From: Alexander Spohr <email@hidden>
References: 
 >SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY? (From: Alexander Spohr <email@hidden>)

  • Prev by Date: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?
  • Next by Date: Re: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?
  • Previous by thread: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?
  • Next by thread: Re: SELECT count(*) throws - column "t0.allianceid" must appear in the GROUP BY?
  • Index(es):
    • Date
    • Thread