dynamic tablename with %rowtype
Date: 12 Apr 2004 22:19:37 -0700
Message-ID: <3f2140c3.0404122119.780e062d_at_posting.google.com>
how to handle a situation where i wnt a variable of type ref cursor.
TYPE refCur IS REF CURSOR;
myRow rc%rowtype; -- How can I make this work???
The whole problem is that only on run time I am able to know the table
on which i have to work. So I have created a Ref Cursor
BEGIN
OPEN rc FOR sqlStmt;
....
rc refCur;
sqlStmt := 'select * from ' || mytable; -- mytable is stored in one
of the table in the database. depending on the parameter passed to
the proc the table name is retrived.
LOOP
FETCH rc into myRow; -- ??? I want to fetch the data from the
cursor in a rowtype of the table - mytable. how to handle this
situation.
....
END LOOP;
END;
please guide me... as to how can i make a variable of my cursor
rowtype. i am in urgent need of a solution asap.
thanks
Sri Received on Tue Apr 13 2004 - 07:19:37 CEST