in reply to Re^2: Getting error while invoking a SQL Procedure
in thread Getting error while invoking a SQL Procedure

I think you don't need any special treatment with "BEGIN" and "END" -- the sql statement should just be the procedure call, and when you execute it, you just have to make sure you pass the right number of params in the right order:
my $sql = "CBT.SP_LOG_CONSOLE(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; my $sth = $dbh->prepare( $sql ); my @params = ...; # you need 10 values here $sth->execute( @params );
If that comes back with an error from Oracle, maybe there's a problem with the stored procedure at the server side.

Replies are listed 'Best First'.
Re^4: Getting error while invoking a SQL Procedure
by mje (Curate) on Sep 08, 2009 at 13:56 UTC

    You don't need the BEGIN/END but if you just take them out it won't work. You'd have to prefix the sql with "call" and you don't want to do that as call gobbles up NO_DATA_FOUND errors (documented by Oracle somewhere).