Assuming an object in PL/SQL on Oracle:
CREATE OR REPLACE TYPE myObj
AS OBJECT (
Col1 number,
Col2 varchar(2),
Col3 timestamp,
...
Col57 number
);
(Why an object? Because OCI programming doesn't allow PL/SQL RECORD type. ;)
And now here's what I'd LIKE to run. Is anything like this possible? I need to call a package function that takes IN this object. How can I bind perl variables to the PL/SQL object? I'm using PL/SQL to get at a package/function in the database. This function does post-processing on the object (which really just represents a row of data). We're all trying to avoid 57 bind variables. :)
my $sql = "
DECLARE
in_row myObj;
retcode number;
BEGIN
:retcode := Otherpackage.Function(:in_row);
END;
";
my $sth = $dbh->prepare($sql) ...
My main question is... how do I bind a list or hash to :in_row in the
$dbh->bind_param(":in_row", \%hash, ...);
-ArchFool