• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate comparing columns

 
David de Lucca
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys!

Anyone knows how can i do a criteria to compare the difference between to two columns? I need to compare the difference between two dates!

Thanks

David
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure I understand. Are you trying to select data based on a date range?
 
David de Lucca
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes!

something like 'select * from table whete datediff(hour, column1, column2) between 1 and 5'.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
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!