Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: returning certain rows from a SELECT
Hi:
I think you can use PL/SQL table to return a set of rows.
Michael.
Neil Kandalgaonkar <neil_at_domingo.concordia.ca> wrote in message
news:7m38lt$ans$1_at_newsflash.concordia.ca...
> Hello, I'm new to Oracle, maybe my approach here is completely wrong,
> but here's my problem:
>
> I am using Oracle8 through Perl's DBI. I would like to obtain specific
> row-ranges from my SELECT statements, i.e., give me rows 26-50 of 'SELECT
> * FROM foo'.
>
> I can get this to work nicely in SQLPLUS using a cursor, loop, and
> %ROWCOUNT, but these results are all printed to the screen, inserted into
> a temporary table, or something similar.
>
> How can I make a function (?) or something similar (?) that will return
> rows that DBI will understand?
>
> I imagine something like
>
> "SELECT * FROM complicated_query(26,50)"
>
> or even
>
> "SELECT * FROM slice_query('SELECT foo,bar FROM quux',26,50);
>
> and while I could construct the query with the dbms_sql package,
> I'm not sure how to make the procedure or function return the rows.
>
> or is there a way to get Perl/DBI to understand dbms_output lines?
>
> Thanks in advance.
>
>
Received on Thu Jul 08 1999 - 19:06:09 CDT