|
|
Re: How to use a boolean returned function in a query [message #237634 is a reply to message #237630] |
Tue, 15 May 2007 05:00  |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
manoj_vilayil wrote on Tue, 15 May 2007 11:49 | Please reply it immediately.
|
Please don't do that.
If you want immediate answers, or priority over other users, start paying us.
As Michel said, you cannot use booleans in sql, but you can write a wrapper function that returns a string value of your boolean.
eg
create or replace function your_bool
( p_param1 in number
) return boolean
is
l_var1 number;
begin
return p_param1 > l_var1;
end your_bool;
/
create or replace function your_bool_for_sql
( p_param1 in number
) return varchar2
is
begin
return case when your_bool(x) then 'TRUE'
when not your_bool(x) then 'FALSE'
else 'NULL'
end;
end your_bool_for_sql;
/
|
|
|