Re: Count records dynamically

From: The Man, The Myth, The Legend <hotkee_at_hotmail.com>
Date: Sat, 9 Sep 2000 16:45:24 +0100
Message-ID: <8pdm5d$oaf$1_at_plutonium.btinternet.com>


use
TableName IN VARCHAR2

Robert Vabo <robert.vabo_at_gecko.no> wrote in message news:1g5t5.808$N4.283106_at_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_at_gecko.no
>
>
Received on Sat Sep 09 2000 - 17:45:24 CEST

Original text of this message