Forum Discussion
Getting different output when selecting dates and check in null values
- Anonymous2 years ago
Hi darktiger7 ,
Thanks for reaching out to us with your problem. According to your description, it seems like you’re experiencing discrepancies in the number of rows returned by your Oracle SQL query when you select dates and when you don’t. Please check if the parameter :i_actual_dt_from and :i_actual_dt_to has been set the suitable dates... If both of them are NULL, then the following conditions will always true. It will return the rows with unlimited dates.
and (trunc(vm.act_dt) >= to_date(:i_actual_dt_from) OR to_date(:i_actual_dt_from) is NULL)
and (trunc(vm.act_dt) <= to_date(:i_actual_dt_to) OR to_date(:i_actual_dt_to) is NULL)Best Regards
Hi darktiger7 ,
Thanks for reaching out to us with your problem. According to your description, it seems like you’re experiencing discrepancies in the number of rows returned by your Oracle SQL query when you select dates and when you don’t. Please check if the parameter :i_actual_dt_from and :i_actual_dt_to has been set the suitable dates... If both of them are NULL, then the following conditions will always true. It will return the rows with unlimited dates.
and (trunc(vm.act_dt) >= to_date(:i_actual_dt_from) OR to_date(:i_actual_dt_from) is NULL)
and (trunc(vm.act_dt) <= to_date(:i_actual_dt_to) OR to_date(:i_actual_dt_to) is NULL)
Best Regards