Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

2x cursor: 1x user_tables + 1 x tab_cols

537632Jun 27 2008 — edited Jun 30 2008
Hi guys,

I was just wondering whether it is possible to dynamicaly get all user tables then all user columns and write all content to a file.

What I am trying to do is export all the tables listed in user_tables.
I have got the loop already for the user_tables and the loop for the user_columns too,
but then I need to get the column name dynamically and then something like this doesn't work:

OPEN the_cursor_table FOR 'select * from '|| utables.table_name;
LOOP
table_name := utables.table_name;

* FETCH the_cursor_table INTO table_name%rowtype;
EXIT WHEN the_cursor_table%NOTFOUND;


It is not working on the line with an astrix, how can this be fixed?

4Eyes
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 28 2008
Added on Jun 27 2008
12 comments
858 views