Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: returning certain rows from a SELECT
you can use the dbms_output putline and getline functions in perl.
run your proc, output with putline, then run getline...
# Prepare stored procedure call
my $lookup = $output;
my $sproc_call = $lookup->prepare(q{
BEGIN
noPhotos;
END;
});
$sproc_call->execute;
$sproc_call->finish;
# Format report output and print it
$sproc_call = $lookup->prepare("begin dbms_output.enable(100000);
end;");
$sproc_call->execute;
$sproc_call->finish;
$sproc_call = $lookup->prepare("begin dbms_output.get_line
(:line,:status); end;");
while ($status ne '1')
{
$sproc_call->bind_param_inout(":line", \$test_text, 255);
$sproc_call->bind_param_inout(":status", \$status, 100);
$sproc_call->execute;
print "$test_text\n";
}
$sproc_call->finish;
exit (0);
or try using rownum in sql.. where rownum between....
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Tue Jul 20 1999 - 17:32:04 CDT