Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00904: invalid column name
ORA-00904: invalid column name [message #18772] Wed, 13 February 2002 22:43 Go to next message
ksr
Messages: 112
Registered: January 2002
Senior Member
Hi,
How do i execute this function with a boolean variable as input

CREATE OR REPLACE FUNCTION WNS.fun_test1(Input in varchar,
case1 in boolean
) return boolean IS
output1 varchar2(10);
BEGIN
output1:= 'match';

if output1 ='not match' then
return false;
else
return true;
end if;
EXCEPTION WHEN OTHERS THEN
return false;
end fun_test1;
/

From the sql plus i am trying to execute this
SQL> select fun_test1('one',true) from dual;
select fun_test1('one',true) from dual
*
ERROR at line 1:
ORA-00904: invalid column name

What parameters has to be given to execute this particular one..
Re: ORA-00904: invalid column name [message #18774 is a reply to message #18772] Wed, 13 February 2002 23:20 Go to previous messageGo to next message
Satish Shrikhande
Messages: 167
Registered: October 2001
Senior Member
declare
-- Boolean parameters are translated from/to integers:
-- 0/1/null <--> false/true/null
result boolean;
case1 boolean := sys.diutil.int_to_bool(:case1);
begin
-- Call the function
result := fun_test1(input => :input,
case1 => case1);
-- Convert false/true/null to 0/1/null
:result := sys.diutil.bool_to_int(result);
end;
Re: ORA-00904: invalid column name [message #18794 is a reply to message #18774] Thu, 14 February 2002 06:58 Go to previous message
ksr
Messages: 112
Registered: January 2002
Senior Member
Hi,
when i execute it gives me some errors,
can you try to execute and tell me what is needed to be added
Previous Topic: Re: B*-tree indexes
Next Topic: buffer
Goto Forum:
  


Current Time: Fri Sep 24 15:18:23 CDT 2021