Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL Problem
You are an OCP and you don't know the answer and/or how to find the answer
to this question?
Shame to the OCP program.
Check out dbms_sql for version 7.3 and 8.0 and native dynamic sql for 8i,
all in your pl/sql manual and/or the books of Steven Feuerstein.
Regards,
Sybrand Bakker, Oracle DBA
"VampireD" <vampired_at_my-deja.com> wrote in message
news:8sprgb$bgn$1_at_nnrp1.deja.com...
> DECLARE
>
> CURSOR get_table_sizes_cur
> IS
> SELECT table_name
> FROM dba_tables
> WHERE table_name = 'TRADE_HISTORY';
>
> row_count NUMBER;
> tab_name get_table_sizes_cur%ROWTYPE;
>
> BEGIN
>
> FOR tab_name IN get_table_sizes_cur
> LOOP
> SELECT count(*)
> INTO row_count
> FROM tab_name;
> dbms_output.put_line(row_count);
>
> EXIT WHEN get_table_sizes_cur%NOTFOUND;
> END LOOP;
>
> END;
> /
>
>
> How would I get the SELECT to read from tab_name rather than from a
> particular table?
>
> --
> Christopher R. Spence
> OCP, MCP, MCSE, A+, RAPTOR, CNA
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Oct 20 2000 - 12:02:34 CDT
![]() |
![]() |