This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
What is the purpose of group by if there is no aggregate function in your select statement? If we replace "viewname" with a table this query will not fail. Can you provide a real sql statement? I suppose there is something within "viewname" (view?)
Joined: Jun 13, 2011
i have written a named query in my JPA entity and the query is 'Select o from VStatus o', here Vstatus is the entity in JPA and in DB it is referring a view.
i have tried different forms of query given in previous post to get rid of the error but it always throws this error in logs and the list doesn't get populated,
The view has values in the database, so i dont think there is a problem in the view
I haven't done decent SQL in a while. After looking at Fatih's post I think I might see yhe problem. If you are doing a simple select with no aggregate function, you should be doing an ORDER BY instead of GROUP BY.