Skip to Main Content

DevOps, CI/CD and Automation

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!

How to use user defined funcions in SQL query in data model.

543071Jun 4 2007 — edited Jun 5 2007
Hi,
I am facing a problem in making use of user defined function in sql query in data model.i have defined this function in the report builder.

i have written user defined function func1 as

func1 return number is
dep_num number;
begin
select dep_id into dep_num from employee where emp_id=2235;
return dep_num;
end;

In the data model view.I have written SQL query as

select depname from department where dep_id =func1();

but for this SQL query i am getting error as ora-00094 func1 variable not defined.

how to resolve this problem

Regards,
Mithun
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2007
Added on Jun 4 2007
3 comments
586 views