Abhilash Shah (abshah) wrote: > Does anybody know how I can call a oracle PL/SQL function in PERL?
Various examples in the documentation: http://theoryx5.uwinnipeg.ca/CPAN/data/DBD-Oracle/Oracle.html#PL%2fSQL_Examples > $csr = $db->prepare(" > declare > type abc refcursor; I think you mean REF_CURSOR, not refcursor. > BEGIN > abc:= XXCTS_ILS_AM.get_opera_activity_codes; > END;"); > $csr->execute; > > print "called successfully\n\n"; > # Close the cursor. > $csr->finish; > # Disconnect from the database. > $db->disconnect; > > And below is the error I get when I try to run this code : > DBD::Oracle::db prepare failed: ORA-06550: line 3, column 18: > PLS-00103: Encountered the symbol "REFCURSOR" when expecting one of The typo of ref_cursor caused this. Once you fix that, then you'll be executing the statement, but you've not bound :abc anywhere. Look at the cursor example in the docs for this bit (the bind_param_inout part): http://theoryx5.uwinnipeg.ca/CPAN/data/DBD-Oracle/Oracle.html#Binding_Cursors -- Andy Hassall ([EMAIL PROTECTED]) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)