in reply to DBD::Oracle - Cursor in Select

The DBD::Oracle docs only refer to being able to bind cursors in PL/SQL blocks. Could very well be that cursors as return values from select statements just aren't supported (yet). I'm just guessing, here, but perhaps the reason this is done is so because a fetchall_* (or selectall_*, or anything similar) could result in a vast number of open cursors. Considering that a typical init.ora limits the number of open cursors to a few hundred, this would be a very bad thing.

Of course, you could always just get your own cursor for each row:

my $sth = $dbh->prepare("Select a, b from t1") or die "..."; $sth->execute or die "..."; while (my $row = $sth->fetchrow_arrayref) { my $cursor = $dbh->prepare("select d, e from t2 where k = ?"); $cursor->execute($row->[1]); # t1.b .... }
Of course, anyone who's binding cursors probably already knows this :-D
------------ :Wq Not an editor command: Wq