He's on version 7.3.4.
I liked your second suggestion, tho.
-----Original Message-----
Sent: Wednesday, January 31, 2001 2:57 PM
To: ORACLE-L
Cc: MGogala
Yes it does. So?
-----Original Message-----
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 3:26 PM
To: Multiple recipients of list ORACLE-L
Doesn't EXECUTE IMMEDIATE require 8i?
-----Original Message-----
Sent: Wednesday, January 31, 2001 1:37 PM
To: ORACLE-L
Cc: MGogala
a) Try execute immediate instead of DBMS_SQL.
b) Shoot the application designer.
-----Original Message-----
Sent: Wednesday, January 31, 2001 12:11 PM
To: Multiple recipients of list ORACLE-L
Hi,
I have to dynamically create a table and then
dynamically get the count
of the rows in a variable. i'm using Oracle 7.3.4.
i have written the following code...but its not
working.
please help me out.
thanx in advance.
CREATE OR REPLACE PROCEDURE CR_TABLE AS
A NUMBER;
QUERY1 VARCHAR2(200);
QUERY2 VARCHAR2(200);
CUR1 INTEGER;
CUR2 INTEGER;
RET1 INTEGER;
RET2 INTEGER;
BEGIN
CURSOR1:=DBMS_SQL.OPEN_CURSOR;
QUERY1:='CREATE TABLE CR AS SELECT * FROM INS';
DBMS_SQL.PARSE(CUR1,QUERY1,DBMS_SQL.V7);
RET1:=DBMS_SQL.EXECUTE(CUR1);
DBMS_SQL.CLOSE_CURSOR(CUR1);
DBMS_OUTPUT.PUT_LINE('TABLE CREATED');
CUR2:=DBMS_SQL.OPEN_CURSOR;
QUERY2:='SELECT COUNT(*) FROM CR';
DBMS_SQL.PARSE(CUR2,QUERY2,DBMS_SQL.V7);
RET2:=DBMS_SQL.EXECUTE_AND_FETCH(CUR2);
A:=DBMS_SQL.LAST_ROW_COUNT;
DBMS_SQL.CLOSE_CURSOR(CUR2);
DBMS_OUTPUT.PUT_LINE('ROWS COUNTED');
END;
-anurag