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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Row-Count in PL/SQL

Re: Row-Count in PL/SQL

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 15 Jan 2004 10:25:38 -0800
Message-ID: <1074191062.653852@yasure>


Oliver Braun wrote:

> Hi,
>
> IŽd like to count table-rows in PL/SQL.
> The tablename comes from a variable. Something like:
>
> SELECT COUNT(*) INTO V_ROWS
> FROM V_TABLE_NAME;
>
> I still get the same error message:
> "V_TABLE_NAME must be declared"
>
> But V_TABLE_NAME is declared in my
> CURSOR-SELECT-Statement.
>
> Thanks for all suggestions.
>
> O.Braun

Use Native Dynamic SQL.

You will find examples at tahiti.oracle.com and asktom.oracle.com.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Jan 15 2004 - 12:25:38 CST

Original text of this message

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