Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need HQL  RSS feed

 
Roopesh Rana
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I required HQL

There is two tables
One is User table which is having 3 columns
Userid
username
userpassword

Second is Search table which is having 3 columns
Userid
Search content
Search time

Now I need HQL, will return all userid, which searched something just 15 min befor.

If anybody have idea please revert me.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roopesh Rana wrote:I required HQL ...
Now I need HQL, will return all userid, which searched something just 15 min befor.

Sorry. Thats not how the Ranch works. Please read =>NotACodeMill
What have you tried so far and where are you stuck?
 
Roopesh Rana
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried this

 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16026
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That query looks like something entirely different than what you asked in your first post.

You asked for some query for all user ids which did a search in the last 15 minutes.

The query you are posting now seems to select user ids from users which are geographically located within a certain distance from some point.

So, what is your question about? By the way, the answer to your first question is really simple. Just do a select from search_table where search_time < something.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!