Function that returns boolean, used in WHERE clause of the SELECT
527448Feb 12 2009 — edited Feb 12 2009I have the following function below:
create function IS_VALID
(
departure in date,
begin_date in date
) return boolean is
begin
return (departure >= begin_date);
end IS_VALID;
/* Structure of the table in which the function is used to select
create table data_validate (departure date);
insert into data_validate values (add_months(sysdate, 2));
*/
When I use the function in the code of a package, I receive the error: ORA-00920: invalid relational operator:
select *
from data_validate d
where IS_VALID_SALE(d.departure, sysdate);