RE: How to get the count of all tables using dbms_sql

2002-10-21 Thread Charu Joshi
If the database is 8i+, you can try 'EXECUTE IMMEDIATE' command. Does make life somewhat simpler. Regards, Charu -Original Message- Ling Catherine (CSC) Sent: Thursday, October 17, 2002 3:25 PM To: Multiple recipients of list ORACLE-L Hi, I've found the answer. DECLARE countval

RE: How to get the count of all tables using dbms_sql

2002-10-17 Thread CHAN Chor Ling Catherine (CSC)
Hi, I've found the answer. DECLARE countval NUMBER; curidBINARY_INTEGER; retval NUMBER; BEGIN for i in (select OWNER,TABLE_NAME from DBA_TABLES WHERE ROWNUM) loop curid:= dbms_sql.open_cursor; dbms_sql.parse( curid, 'BEGIN SELECT count(*) INTO :cntval FROM '||

Re: How to get the count of all tables using dbms_sql

2002-10-17 Thread Stephane Faroult
CHAN Chor Ling Catherine (CSC) wrote: Hi, I need to insert the total number of records all the tables into the table, MIGRATION_TABLE. I want to use the How do I obtain the count(*) into a variable in dbms_sql.parse(cid, 'SELECT COUNT(*) FROM ' ||i.owner||'.'||i.table_name, dbms_sql.v7);

RE: How to get the count of all tables using dbms_sql

2002-10-17 Thread Robson, Peter
Its just possible that the script I presented at UK-OUG two years ago may meet your requirements. It uses nested SQL*Plus (not pl/sql) to count as many tables as you identify in a driver table, and store those results. Check it out at http://peter-robson.port5.com/count.htm The site will be