Topics Topics Help/Instructions Help Edit Profile Profile Member List Register Paatha Gnyapakaalu - Archives from Old DB  
Search New Posts 1 | 2 | 8 Hours Search New Posts 1 | 3 | 7 Days Search Search Tree View Tree View Latest tweets Live Tweets   Hide Images

Rate this post by selecting a number. 1 is the worst and 5 is the best.

    (Worst)    1    2    3    4    5     (Best)

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Symbol_of_king
Kurra Bewarse
Username: Symbol_of_king

Post Number: 2115
Registered: 12-2005
Posted From: 72.209.237.32

Rating: N/A
Votes: 0

Posted on Friday, April 12, 2013 - 12:02 am:   

cursor c1 is
select table_name from demo_tbl_list
where table_name in (
select a.table_name
from dba_tab_cols a,
demo_tbl_list b
where a.table_name = b.table_name);

cursor table_data(i_table_name varchar2) is
select column_name from dba_tab_cols where table_name=i_table_name;

file_location varchar2(100) := '\tmp';
file_name varchar2(40);

begin

for r1 in c1
loop
l_query:='Select ';
for r_column in table_data(r1.table_name)
l_query:=l_query||r_column||',';
end loop
l_query:=rtrim(l_query,',')||' from '||r1.table_name;
execute_immediate 'l_query';
end loop;
end;

Topics | Last Hour | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration