Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle - trunc(DateTime) between trunc(Sysdate - 104) and trunc(Sysdate - 75)

b04ed155-c38f-4217-bf7d-552fc18ce4a9Sep 12 2017 — edited Sep 12 2017

I want to select few data from a Oracle table of June month(June 1st to June 30th of 2017) and the start date will be from tomorrow(Sep 13th). Hence I wrote a query in below format,

select * from table where column1='Data1' and Column2='Data2' and trunc(DateTime) between trunc(sysdate-104) and trunc(sysdate-75)

I'm not able to check this query as I don't have tool for this. I just wrote it in notepad and want to share to my friend.

My Question - Will trunc(DateTime) between trunc(sysdate-104) and trunc(sysdate-75) condition will give data between June 1st to June 31st or Does any Syntax issue there?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2017
Added on Sep 12 2017
4 comments
2,354 views