DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Dynamic Cursor Declration

  1. #1
    Join Date
    Oct 2000
    Posts
    2
    Hi Everyone,

    I'm in process of creating Oracle procedure to populate one table pulling information from 5 different source tables. To do this i need to declare 5 cursors to select information from source tables and insert into my target table.

    I was wondering if there is way to declare one cursor and substitute table names dynamically getting source table names from another table. This would avoid lot of maintenance in future, when my source tables become 5 to 10 in future.

    Any help in this regard is much appreciated.

    Thanks

    Srinivas

  2. #2
    Join Date
    Aug 2000
    Location
    Ny
    Posts
    105
    I think that your best shut is to create a procedure that will accept table names as parameters and then dynamically create the procedure the populate/manipulate these tables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width