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 -> when is a variable not a variable

when is a variable not a variable

From: John Steinbach <bach_at_panix.com>
Date: 1997/01/28
Message-ID: <5cma2o$874@panix.com>#1/1

PROCEDURE count_tables IS
v_name CHAR(20);
v_count INTEGER;
CURSOR c_tables IS

	SELECT table_name 
	FROM user_tables
	WHERE tabelspace_name = 'tablespacename';
BEGIN         
	FOR x IN c_tables LOOP
		v_name := x.table_name;
		SELECT COUNT(*) INTO v_count
		FROM v_name;
		
		INSERT INTO table_count(table_name,count)
			VALUES(v_name,v_count);
	ENND LOOP;

END; The following code does not work. I was tring to get a row count of all my table spaces without hardcoding the table names.

Any Thoughts?

John STeinbach
Bartlett Tree Experts Received on Tue Jan 28 1997 - 00:00:00 CST

Original text of this message

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