Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

boolean function issue

447981Aug 1 2005 — edited Aug 2 2005
SQL> create or replace function my_func
2 return boolean as
3 x boolean;
4 begin
5 x := true;
6 return x;
7 end;
8 /

Function created.

SQL> select my_func from dual;
select my_func from dual
*
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type


SQL>

Above is what I thought was a simple function that returns a boolean value. I am doing a asp.net project and i need a simple function to call as a test. I have written a simple function that returns an int, string already and i dont understand the error above....

Can some one give me an example of a function that returns a boolean value based around a simple table like the emp table for example. That would be great thanks ( or else tell me whats wrong with my simple ha ! function above)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2005
Added on Aug 1 2005
17 comments
1,985 views