|
-
My question is that i write a procedure to get table_name, number of rows, number of blocks from some schema and i want to using dynamic sql to insert these information into a table which name is table_sum and its description like below list
table_name varchar2(10),
number_of_rows number(6),
number_of_blocks number(8),
modify_date date
i try the below instruction , but it not work ??
cursor_id:=dbms_sql.open_cursor ;
instruction :=' insert into table_sum values (' || table_name || ',' || num_rows || ',' || num_blocks || ',' || to_char(sysdate,'yyyy/mm/dd') || ')' ;
commit;
dbms_sql.parse(cursor_id,instruction,dbms_sql.v7);
rtn := dbms_sql.execute(cursor_id);
dbms_sql.close_cursor (cursor_id);
-- rem table_name, num_rows, num_blocks is parameter
please kindly help , thanx
dannier
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|