in reply to PL/SQL code and Perl
The code below uses execute to do an already compiled procedure but the DBI::FAQ shows use of begin from Perl which may be more use.
Code shows proc and code to kick it off.
CREATE OR REPLACE PROCEDURE my_proc (id IN NUMBER, uname IN VARCHAR2, card IN VARCHAR2) AS BEGIN INSERT INTO TABLE VALUES (id, uname, card); END; my $sth = $dbh->prepare('call owner.my_proc(?, ?, ?)'); for (1..$iter) { print "$_\n"; $sth->execute($id, $name, $card); $id++; } $dbh->commit;
|
|---|