Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> dbms_sql vs. plsql

dbms_sql vs. plsql

From: Paul Postel <paulp_at_fastx.com>
Date: Thu, 06 May 1999 14:25:47 -0700
Message-ID: <373208DB.D14D85F7@fastx.com>


Hi,

I'm trying to use dbms_sql to execute an anonymous pl/sql block. Essentially I want to call a function and retrieve the function's return value. Everything works fine if the function returns an integer. However, I can't make it work if the function returns a varchar2. FYI, I'm on Solaris/Oracle 7.3.3.6. I've included a sample script below that shows the problem. Anybody else successfully done this?

Thanks in advance,

Paul Postel
paulp_at_fastx.com


set serverout on  

create or replace function fn_int return integer is begin

    return 999;
end;
/    

create or replace function fn_varchar2 return varchar2 is begin

    return '999';
end;
/  

/*
/*
Received on Thu May 06 1999 - 16:25:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US