I have the following Oracle Query
SELECT COMPANY_NO FROM COMPANY where to_date('2020-07-20', 'yyyy-mm-dd') BETWEEN START_DATE and END_DATE;
The table was created and data was inserted using the following queries
CREATE TABLE COMPANY (COMPANY_NO varchar2(20), START_DATE varchar2(20), END_DATE varchar2(20));
INSERT INTO COMPANY (COMPANY_NO,START_DATE,END_DATE) VALUES ('Test','01.07.2020','31.07.2020');
If I execute the select query from DB Visualizer in Windows, it throws the following error - "[Code: 1843, SQL State: 22008] ORA-01843: not a valid month".
But If i execute the same query from Ubuntu IntelliJ Database IDE, it passes giving the resultset.
If the date format is not matching, then why it is passing in Ubuntu? Please suggest why this is happening and what needs to be changed.
- Database - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
- Windows - Microsoft Windows 10 Enterprise
- DB Visualizer - Free 10.0.18
- Ubuntu - Ubuntu 16.04.6 LTS
- IntelliJ IDEA - 2018.3.5 (Ultimate Edition)