• 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'.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic