HOW TO BINBIND VARIABLE IN FUNCTION [message #10100] |
Mon, 05 January 2004 19:13 |
satish
Messages: 112 Registered: September 2000
|
Senior Member |
|
|
Hi Friends,
I have a small help from you.
My Requirement:
---------------
A function, accepts table name as input and gives No of records that table as output.
Function Written:
CREATE OR REPLACE FUNCTION NO_OF_REC(MTABLE_NAME VARCHAR2)
RETURN NUMBER
IS
NO_OF_REC NUMBER ;
BEGIN
SELECT COUNT(ROWID) INTO NO_OF_REC FROM :MTABLE_NAME ;
IF NO_OF_REC IS NULL THEN
NO_OF_REC:= 0;
END IF ;
RETURN(NO_OF_REC);
END NO_OF_REC;
Error getting:
PLS-00049 Bad bind variable 'MTABLE_NAME'
Solution required:
How to bind the variable?
Please help me.
|
|
|
|
|