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 -> Re: dynamic sql question HELPPPPPPPPPP

Re: dynamic sql question HELPPPPPPPPPP

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Thu, 6 Jan 2000 11:44:06 +0100
Message-ID: <851rlt$17p3$1@news5.isdnet.net>


cid := dbms_sql.open_cursor;
dbms_sql.parse (cid, 'Select count(*) from '||table_name, dbms_sql.native); dbms_sql.define_column (cid, 1, nbrows); rows := dbms_sql.execute_and_fetch (cid); dbms_sql.column_value (cid, 1, nbrows); dbms_sql.close_cursor (cid);

then nbrows contains the number of rows of your table. (cid, rows and nbrows are integers)

--
Have a nice day
Michel

gndiving <dwhite_at_vrinter.net> a écrit dans le message : 850p9j0oss_at_enews4.newsguy.com...
HI all I have a DBMS_SQL question

I need to read the rowcount of a group of tables(275) into a variable how can I do this dynamically

I have DBMS_SQL.PARSE(datCursor,SELECT COUNT(*) FROM ' || datTableName,DBMS_SQL.NATIVE);
WHATS IAM HAVING PROBLEMS WITH IS THE DBMS_SQL.COLUMN_DEFINE STATEMENT IF SOME ONE COULD GIVE ME A SOLUTION TO THIS IT WOULD BE GREATLY APPRECIATED SEND REPLY'S TO dwhite_at_mail.intracorp.com Received on Thu Jan 06 2000 - 04:44:06 CST

Original text of this message

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