We are getting different results with using CDate function in sql using text drivers.
With Text JDBC V5.1, get results correctly but Text JDBC V5.2 and V6.0, cdate function not filtering the records and ended up getting all.
Below is the query we used:
---------------------------
select * from "MY-File" where "Employee Leave Date" is not null and cdate("Employee Leave Date",'dd/mm/yyyy') >= '06-JUL-2017'
If we use DATE() or CONVERT() function it works fine but customers are asking what is the issue with CDate function.
Is there any know issue with CDate on version 5.2 and 6.0.
Kindly help.
|
>With Text JDBC V5.1, get results correctly but Text JDBC V5.2 and V6.0, cdate function not filtering the records and ended up getting all.
Because the automatical conversion for '06-JUL-2017' has been disabled since v5.2. Please download the latest package, which enables that feature now.
'dd/mm/yyyy' should be 'dd/MMM/yyyy' if your stored date is similar to '06-JUL-2017' . For instance, select * from "MY-File" where "Employee Leave Date" is not null and cdate("Employee Leave Date",'dd/MMM/yyyy') >= '06-JUL-2017'
|
Thanks for your response.
So,is V6.0 package latest version or any other version released top of that. I tried the suggested query on V6.0 and its not working there as well.
However, if i use the below queries I am able to get the results properly.
select count(1) from "PD-WD_HR" where "Employee Leave Date" is not null and DATE("Employee Leave Date") >= DATE( '06-JUL-2017');
OR
select count(1) from "PD-WD_HR" where "Employee Leave Date" is not null and cdate("Employee Leave Date",'dd/MM/yyyy') >= DATE( '06-JUL-2017');
Thanks
Prasad
|
Specification-Version: 6.0.048 on July 27, 2018
|