newbie having woes with dbms_output in functions
- From: sean nakasone <seannakasone@xxxxxxxxx>
- Date: Mon, 26 Feb 2007 11:22:36 -1000
Hello,
I have the following function:
create or replace function seanFunc1(val varchar2)
return varchar2 is
begin
dbms_output.enable(1000000);
dbms_output.put_line('hello');
return 'at the end';
end;
/
When I call this function from the sqlplus command line, it does not print 'hello'.
i.e.
select seanFunc1('the') from dual;
But when I call the function in a code block as shown below, it then prints.
declare
var varchar2(50);
begin
select seanFunc1('the') into var from dual;
end;
/
Why is this? What's the simplest way to get output from a function?
.
- Follow-Ups:
- Re: newbie having woes with dbms_output in functions
- From: William Robertson
- Re: newbie having woes with dbms_output in functions
- From: Anurag Varma
- Re: newbie having woes with dbms_output in functions
- Prev by Date: Query Optimization
- Next by Date: Re: Query Optimization
- Previous by thread: Query Optimization
- Next by thread: Re: newbie having woes with dbms_output in functions
- Index(es):