• Post Reply Bookmark Topic Watch Topic
  • New Topic

HQL issue with queries

 
eduard poland
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to count the dates, from the second table, it showing wrong, but actually must count 3 of day 29 and 1 count of day 30. But it's counting from each one. So the error is from the time. And I can't see the solution.



Another problem with query is that I can't transform the mysql to HQL, the problem I can't JOIN(SELECT and FROM(SELECT

 
K. Tsang
Bartender
Posts: 3610
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

For your first question, try casting the datetime to date.

Not sure about if HQL supports sub-query within sub-query.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!