I Want to extract data from a table for monthwise in oracle sql. I tried it as follow, SELECT * From customer ct Where ct. Application_signed _date in (Date '31-12-2020, Date '01-10-2020')
But i am unable to Fetch the data for this range, whereas data is available for this months.
The correct format for a date in Oracle -- and almost everywhere else -- is YYYY-MM-DD:
select *
From customer ct
where ct.Application_signed_date in (Date '2020-12-31, Date '2020-10-01')
Note that Oracle dates can have time components. If that is possible in your data, then one fix is:
where trunc(ct.Application_signed_date) in (Date '2020-12-31, Date '2020-10-01')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.