Home Best way of converting Oracle SQL query to JPA JPQL BETWEEN DATE/TIME
Reply: 0

Best way of converting Oracle SQL query to JPA JPQL BETWEEN DATE/TIME

Rob DePietro
1#
Rob DePietro Published in 2018-02-09 18:17:06Z

I am trying to run this SQL statement that finds a created entry between 6AM today to 6AM the next day. However I am having trouble finding a way of doing this with JPA JPQL. Any info will help, thanks.

SQL STATEMENT

    SELECT * FROM OTHER_ENTRY WHERE CREATED_DT 
    BETWEEN
    trunc(current_timestamp) + interval '6' hour
    AND 
    trunc(current_timestamp + 1)+ interval '6' hour;
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.332884 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO