kprasanna_79 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am using perl to run a PL/SQL block, where i need to get the rows deleted after running the PL/SQL block. When i use ordinary sql query(delete statment), it returns the number of rows deleted, but in PL/SQL even in use DBMS_OUTPUT.put_line, it returns only the value 1 to the ret variable.
$sql=PL/SQL block with DBMS_OUTPUT.put_line(to_char(rowcnt)); $ret=$db->execute($sql);
Please advice -Prasanna.K

Replies are listed 'Best First'.
Re: Return value from PL/SQL block Using perl
by andreas1234567 (Vicar) on Nov 01, 2007 at 08:08 UTC
    Have you tried using dbms_output_get? Or creating a function/procedure with an explicit return (alternatively as an output parameter) of the value you want?

    Show us your code so far.

    Update: Added function/procedure clarification.

    --
    Andreas