Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: returning certain rows from a SELECT

Re: returning certain rows from a SELECT

From: <billpierce_at_my-deja.com>
Date: Tue, 20 Jul 1999 22:32:04 GMT
Message-ID: <7n2td4$ah8$1@nnrp1.deja.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US