From: "The Man, The Myth, The Legend" <hotkee@hotmail.com>
Newsgroups: comp.databases.oracle,comp.databases.oracle.misc,comp.databases.oracle.server,comp.databases.oracle.tools
Subject: Re: Count records dynamically
Date: Sat, 9 Sep 2000 16:45:24 +0100
Organization: BT Internet
Lines: 31
Message-ID: <8pdm5d$oaf$1@plutonium.btinternet.com>
References: <1g5t5.808$N4.283106@juliett.dax.net>
NNTP-Posting-Host: host213-1-131-143.btinternet.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300


use
TableName IN VARCHAR2

Robert Vabo <robert.vabo@gecko.no> wrote in message
news:1g5t5.808$N4.283106@juliett.dax.net...
> I want to count number of records in a table using a cursor so I can use
 it
> on any table
>
> CURSOR CountRecs (TableName VARCHAR2)
>   IS
>   SELECT COUNT(*) FROM TableName;
>
> When I compile this I get an error message :
>
> PLS-00356: 'TABLENAME' must name a table to which the user has access
>
> Any suggestions on another method to do this ?
>
>
> --
> Regards
> Robert Vabo
> Application developer
> Gecko Informasjonssystemer AS
> www.gecko.no
> robert.vabo@gecko.no
>
>



