Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Posts
    47

    Exclamation Unanswered: passing tablename as parameter

    hi,
    in a plsql procedure how can i use the table name which i got it dynamically. like

    create or replace procedure my_pro(table_var VARCHAR)
    as
    begin
    select count(*) from table_var;
    end;

    it says error!! what is the usage like!!
    thanks
    sundar

  2. #2
    Join Date
    Apr 2004
    Location
    Toronto, Canada
    Posts
    249
    You have to use Dynamic SQL to do that.

    Go to the site http://www.oracle.com/technology/index.html
    and search for Dynamic SQL.

    Or try these links:
    http://download-west.oracle.com/docs...ms18.htm#33889

    http://www.oracle.com/pls/db92/db92....MEDIATE#a96624

    Hope that helps.

    Ravi

Posting Permissions

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