Passing a table as a procedure parameter

I'm trying to pass a table_name as a parameter but it is not working. Any idea ???
CREATE OR REPLACE PROCEDURE SIMM.populate_field
( field_name IN all_tab_columns.column_name%TYPE)
IS
v_a part_index_temp.no_dossier%TYPE;
CURSOR c_temp IS
SELECT no_dossier FROM part_index_temp FOR UPDATE;
BEGIN
OPEN c_temp;
LOOP
FETCH c_temp INTO v_a;
EXIT WHEN c_temp%NOTFOUND;
UPDATE part_index_temp a
SET
a.nouv_nom = (
SELECT field_name
FROM part_index_temp
WHERE rnum= (SELECT (1+ABS(MOD(dbms_random.random,10)))
FROM dual)
WHERE CURRENT OF c_temp;
END LOOP;
CLOSE c_temp;
END;

What are you trying to accomplish?
Describe the business requirement and we can help you.
The way you are trying to pass in a Column name (not the table name) requires dynamic sql...

Similar Messages

  • Passing different tables as a input parameter

    HI,
    I've 5 tables TAB1, TAB2, TAB3, TAB4, TAB5
    and I created 5 store procedures to generate 5 file.txt with utl_file utility.
    Now I'd like to know if possible create just one stored procedure (or package) with just one cursor
    that passing different tables as a input parameter.
    Have you any idea?
    Thanks in advance!

    Here you go...
    SQL> create table tab1 as select 1 as x, 'A' as y from dual union
      2                       select 2, 'B' from dual union
      3                       select 3, 'C' from dual;
    Table created.
    SQL>
    SQL> create table tab2 as select 4 as x, 'D' as y from dual union
      2                       select 5, 'E' from dual union
      3                       select 6, 'F' from dual;
    Table created.
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE output_tbl (p_table_name IN VARCHAR2) IS
      2    v_cur     SYS_REFCURSOR;
      3    x         NUMBER;
      4    y         VARCHAR2(10);
      5  BEGIN
      6    OPEN v_cur FOR 'SELECT x, y FROM '||p_table_name||' ORDER BY x';
      7    LOOP
      8      FETCH v_cur INTO x, y;
      9      EXIT WHEN v_cur%NOTFOUND;
    10      -- Here you would output to your file, but for ease of
    11      -- demonstration I'll just dbms_output the data
    12      DBMS_OUTPUT.PUT_LINE(x||' : '||y);
    13    END LOOP;
    14  END;
    15  /
    Procedure created.
    SQL> exec output_tbl('TAB1');
    1 : A
    2 : B
    3 : C
    PL/SQL procedure successfully completed.
    SQL> exec output_tbl('TAB2');
    4 : D
    5 : E
    6 : F
    PL/SQL procedure successfully completed.
    SQL>

  • Passing a table into a procedure to be used in a curor

    Hi,
    I'm using Oracle 9.2.0.6
    I have a procedure that searches all objects for a passed in string value. The procedure is below.
    CREATE OR REPLACE PROCEDURE Find_String (
    pin_referenced_name IN dba_dependencies.referenced_name%TYPE)
    IS
    cursor cur_get_dependancy
    is
    SELECT distinct owner, name, type
      FROM [email protected]
    WHERE lower(referenced_name) = lower(pin_referenced_name) --'ftbv_salesrep_all_1d'
       AND referenced_type != 'SYNONYM'
    order by name;
    v_owner  varchar2(40);
    v_name   varchar2(50);
    v_type   varchar2(40);
        BEGIN
           dbms_output.put_line(upper(pin_referenced_name)||' is found in the following objects.');
           dbms_output.put_line(' ');
           dbms_output.put_line(RPAD('OWNER', 30, ' ')||RPAD('NAME', 60, ' ')||RPAD('OBJECT TYPE', 30, ' '));
           dbms_output.put_line('-------------------------------------------------------------------------------------------------------------------');
            FOR i IN cur_get_dependancy
            LOOP
                v_owner := RPAD(i.owner, 30, ' ');
                v_name  := RPAD(i.name, 45, ' ');
                v_type  := RPAD(i.type, 30, ' ');
                dbms_output.put_line(v_owner ||v_name|| v_type);
            END LOOP;
    END find_string;I was wondering if there's any way I could pass in the table name, and the name of the DB link to be used in the cursor, into the procedure and rig the cursor to be able to accept that as a parameter. I want our users to be able to search different databases using this utility code.
    I thought of NDS, and that would be a way to do it, however I'm not sure if I could use an NDS statement in conjunction with a cursor.
    Does anybody have any suggestions?
    Thanks

    One approach (there are obviously many ways to skin this particular cat)
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    c1           sys_refcursor;
      3    l_val        number;
      4    l_table_name varchar2(30) := 'dual';
      5  begin
      6    open c1 for 'select 1 from ' || l_table_name;
      7    loop
      8      fetch c1 into l_val;
      9      exit when c1%notfound;
    10      dbms_output.put_line( l_val );
    11    end loop;
    12    close c1;
    13* end;
    SQL> /
    1
    PL/SQL procedure successfully completed.Justin

  • Passing a table to an import parameter for a FM

    Hello experts,
    The goal is to update the date of  a record from the database table ZSHIPM_PLAN05.
    In   ABAP dictionnany I define a structure ZST_SHIPM_PLAN05 based on a database table in ZSHIPM_PLAN05
    Further I define a variable import in function Module(FM): IV_SHIPMENT type ZST_SHIPM_PLAN05.
    But I get the following error when compiling the FM: "IV_SHIPMENT" is neither specified under "TABLES"  nor defined as a internal table.
    Thank you for your Help.
    In the top_include I have :
    TYPES: BEGIN OF tt_ZST_SHIPM_PLAN05.
            INCLUDE STRUCTURE ZST_SHIPM_PLAN05.
    END OF tt_ZST_SHIPM_PLAN05.
    DATA: gt_outtab TYPE TABLE OF tt_ZSHIPM_PLAN05,
                 wa_ZSHIPM_PLAN05 LIKE LINE OF gt_outtab.
        CALL FUNCTION 'Z_SHIPM_PLAN_SAVE05'
          EXPORTING
            iv_shipment = gt_outtab
          IMPORTING
            es_return   = gty_bapiret2.
    FUNCTION Z_SHIPM_PLAN_SAVE05.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IV_SHIPMENT) TYPE  ZST_SHIPM_PLAN05
    *"  EXPORTING
    *"     REFERENCE(ES_RETURN) TYPE  BAPIRET2
    LOOP AT IV_SHIPMENT INTO wa_ZST_SHIPM_PLAN05.
    settings the color
      IF wa_ZST_SHIPM_PLAN05-art = 'AA02' and wa_ZST_SHIPM_PLAN05-descr = 'ci0017'.
        wa_ZSHIPM_PLAN05-crea_date = sy-date.
      ENDIF.
      MODIFY gt_outtab FROM wa_ZST_SHIPM_PLAN05 TRANSPORTING crea_date.
    ENDLOOP.
          "MESSAGE 'Do you want save' type 'I'.
           SET SCREEN 0.
    ENDFUNCTION.

    Hi,
    Assign IV_SHIPMENT under changing or tables Parameter because import and Export statement holds a field not structure or table.
    Thanks
    Arbind

  • Passing a table as a parameter

    Hi,
    I want to pass a table name as a parameter to a procedure . A cursor in the procedure will be using the passed parameter , to fetch the values.
    For eg.
    Procedure A(X varchar2)
    cursor c1 is
    select *
    from X;
    right now i'm getting an error , X must be defined...is there any other way to do the same..?
    Thanx in advance.
    Preetha

    You'll need to use dynamic SQL for this. Look up either the dbms_sql package or the 'execute immediate' call.
    With execute immediate, you'd do something like
    Procedure A(X varchar2)
    IS
    sqlStatement varchar2(4000);
    BEGIN
    sqlStatement := 'select * from " || x;
    execute immediate sqlStatement;
    END
    Justin

  • How to pass a table as parameter on a stored procedure

    Hello all,
    I want to pass the name of a table as parameter into a stored procedure, that will be used for cursors etc.
    But when i pass the parameter and i compile the S.P. it give me error (error: table not existing...)
    Any Help?
    Thanks in advance, Marco

    Marco wrote:
    As i've written above, i'm using stored procedures like 'batch' programs which will be executed with oracle scheduler (passing to s.p. the name of the 'input' tables)
    These input tables are 'external' tables which have got the same structure; for example i've got TABLEX_001, TABLEX_002, XXTAB etc. with the same structure.
    This is the the reason... what do you think?An external table definition can reference multiple files via the LOCATION definition or you can user "ALTER TABLE" to alter the location and change the file that the external table points to.
    Thus you only need one static External Table and use an alter table (via execute immediate) to change the file location it points to, or if you want all the data together, just specify all the files in the location.
    That would be clean design, using one fixed table, without the need to pass any table names, just dynamically altering the file names if necessary at run time.

  • Is it possible to pass TABLE as the output parameter in stored procedure

    Hey Experts,
      Is it possible to pass TABLE as the output parameter in stored procedure.
    eg
    create procedure spGetData
    @tableName as TABLE(intValue INT NOT NUL)
    as 

    You can use OPENQUERY or OPENROWSET, as mentioned above, to make stored procedure results table like. There are
    some limitations with these methods:
    http://technet.microsoft.com/en-us/library/ms188427.aspx
    In OPENQUERY this-sql-server-instance can be used instead of a linked server name. It requires setting data accces server option:
    exec sp_serveroption @server = 'PRODSVR\SQL2012'
    ,@optname = 'DATA ACCESS'
    ,@optvalue = 'TRUE'
    LINK: http://www.sqlusa.com/bestpractices/select-into/
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Passing PL/SQL table type as IN Parameter to DB Adapter

    Hi,
    I have an requirement to pass multiple record values(array of values) to an API from BPEL process.
    For this,
    1) I have created a package procedure having PL/SQL table type variable as IN Parameter.
    2) In the BPEL process, created a DB adpater pointing to the above API.(Created wrapper API impicitly)
    When I intiated the BPEL process passing multiple values, the API is taking only the first value, ignoring rest of the values.
    Any reason, why only the first value is accepted by the API ?
    Thanks,
    Rapp.

    If I understand correctly, JPublisher generates a wrapper API for an underlying API that takes a PL/SQL table as an IN parameter. The wrapper will generate and use a SQL nested table as the type for the IN parameter of the wrapper procedure.
    The DB adapter DOES support nested tables, varrays, and objects as IN parameters of an API. The problem you are seeing is most likely due to the way you are modeling your BPEL process, specifically with respect to your Assign activities.
    When you Assign TO an IN parameter, make sure that you drill down all the way and choose the parameter name in the InputParameters root element. Similarly, when you Assign FROM the API value, you must drill down and choose the name of the OUT parameter in the OutputParameters root element.
    In a Transform activity, you would use the FOR construct on the target side to get the values of the nested table or varray from the source side.

  • Passing table name as a parameter

    Hi:
    I have a question regarding passing part of a table name to crystal. I have table getting created everyday and the dynamic part being Table_<date in yymmdd format>, for e.g. - Table_20140225 for table created on 02/25/2014
    I have written query like "select * form Table_{@DT}". This used to work in Crystal 11.5.8.826. but recently we upgraded to 12.2.0.290. In this version of Crystal it is not working and giving me error "com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError".
    Can you please suggest to get around this problem. Running a stored procedure with REFCURSOR is not an option.
    i tried another solution, where i just wrote a stored procedure to do a insert into a table handling the dynamic table in stored procedure. but to my surprise, the stored procedure doesn't execute all the time.
    Any help on this is much appreciated...

    Please see if SP 6 helps. You are on SP 2 at this time.
    https://share.sap.com/a:328ro3/MyAttachments/521c18ac-d7fd-4a58-a2dc-9d40d1951975/
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Whats the difference betweeen passing the table variable and table valued parameter?

    Hi Everbody
      Can someone one tell me what's the difference between passing a table variable and table valued parameter to a stored procedure or function? Can both be used to pass a table to a stored procedure/function?
    Regards
    Regards

    They are essentially the same. What we call a table variable is a local
    variable. A table-valued parameter is an incoming parameter to the
    procedure. The only difference is that the parameter is readonly.
    When you call a stored procedure, you can pass a table variable as the
    actual parameter. Or a table-valued parameter that you pass on.
    CREATE PROCEDURE nisse_sp @tvp sometype READONLY AS
    DECLARE @local someothertabletype
    EXEC pelle_sp @tvp, @local
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Passing VARCHAR table as parameter

    Here is the situation:
    Table_procedure
    (procedure name)
    Table_parameter
    (procedure_name,
    parameter_name,
    parameter_type,
    parameter_value)
    I need to get procedure name from Table_procedure (not a problem),
    then parameters from Table_parameter (not a problem either).
    Then I complie a string in form:
    BEGIN procedure_name(parameter_name=>parameter_value,...,parameter_name=>parameter_value); END;
    and call EXECUTE IMMEDIATE for that string. It also works.
    Now where the problem is:
    If parameter type is Pl/SQL VARCHAR2 TABLE declared in procedure something like:
    TYPE vctable_type IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
    vctable vctable_type;
    How can I use previously described logic with this kind of parameter?
    Thank you in advance.

    Well you could..........
    First, I would change the procedure to a package, then I would change the parameter list to a single PL/SQL input type (see example below). Then I would build a PL/SQL table of parameters, and then pass it in.
    1)  You select parameter names directly into a PL/SQL table
    set echo on
    DROP TABLE TEST;
    CREATE TABLE TEST ( Str1    VARCHAR2 ( 100 ) );
    INSERT INTO TEST VALUES ( 'A' );
    INSERT INTO TEST VALUES ( 'b' );
    INSERT INTO TEST VALUES ( 'c' );
    INSERT INTO TEST VALUES ( 'd' );
    INSERT INTO TEST VALUES ( 'e' );
    COMMIT;
    SQL>
    SQL> set serveroutput on size 1000000
    SQL> DECLARE
      2      TYPE t_Varchar2 IS TABLE OF VARCHAR2 ( 2000 )
      3          INDEX BY BINARY_INTEGER;
      4      v_Table  t_Varchar2;
      5      --
      6      --
      7      PROCEDURE Show_Count ( p_Table IN t_Varchar2 )
      8      IS BEGIN
      9          DBMS_OUTPUT.Put_Line ( 'And the count is :' || p_Table.COUNT );
    10      END;
    11      --
    12      --
    13  BEGIN
    14      SELECT  Str1
    15      BULK COLLECT INTO v_Table
    16      FROM TEST;
    17      --
    18      Show_Count ( v_Table );
    19  END;
    20  /
    And the count is :5
    PL/SQL procedure successfully completed.
    2) You could build a comma delimited string and use DBMS_UTILITY.Comma_To_Table to build your PL/SQL table, and then pass it in.Break a leg,
    Eric Kamradt

  • Pass table name as a parameter to function

    Is there a way to pass table name as a parameter to functions? Then update the table in the function.
    Thanks a lot.
    Jiaxin

    Hi, Harm,
    Thank you very much for your suggestion and example. But to get my program work, i need to realise code like follows:
    CREATE OR REPLACE FUNCTION delstu_func(stuno char) RETURN NUMBER AS
    BEGIN
    EXECUTE IMMEDIATE 'DELETE FROM student s' ||
    'WHERE' || 's.student_number' || '=' || stuno;
    LOOP
    DBMS_OUTPUT.PUT_LINE('record deleted');
    END LOOP;
    END;
    SELECT delstu_func('s11') FROM STUDENT;
    The intention is to check if such a function can perform operations such as update, delete and insert on occurence of certain values. When executing the above statement, the system returns an error message:
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    ORA-06512: at "SCMJD1.DELSTU_FUNC", line 3
    Could you tell me where is wrong?
    Jiaxin

  • Pass unicode data in SQL Server 2008 stored procedure parameter

    Hi,
    I want to pass unicode data in a SQL stored procedure. But I am not sure that how to append N with NVarchar datatype.
    For example I Create a table LocalizationTest and wants to insert a few records.
    Create table LocalizationTest
        Field1 NVarchar(255)
    INSERT INTO LocalizationTest
    VALUES(N'123 Illini Dr, 東皮奧里亞, 8989')
    the above given statement works.
    To explain it more , script A works but script B does not work.
    DECLARE @X NVARCHAR(255)
    [A]
    SET @X=N '123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO LocalizationTest
    VALUES(@X)
    [B]
    SET @X= '123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO LocalizationTest
    VALUES(@X)
    What is the correct way to execute script B because @X will be passed in a SQL Stored Procedure?
    Thanks
    Sharma M.

    If you do not pass the value as a Unicode value there is nothing left of the Unicode characters but question marks. Once this has happened, AFAIK there is no way to undo it (other than resetting the value as Unicode characters again).
    Affirmative.
    Demo - This is what happens if you convert UNICODE (nvarchar) to varchar with implicit conversion (try to force 2 bytes into one byte).
    3F hex is '?'.
    CREATE TABLE #LocalizationTest (Field1 VARCHAR(255))
    INSERT INTO #LocalizationTest
    VALUES(N'123 Illini Dr, 東皮奧里亞, 8989')
    DECLARE @X NVARCHAR(255), @dSQL NVARCHAR(MAX)
    SET @X=N'123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO #LocalizationTest VALUES(CONVERT(NVARCHAR(255),@X))
    SET @dSQL = N'INSERT INTO #LocalizationTest VALUES(N'''+@X+''')'
    PRINT @dSQL
    EXEC sp_ExecuteSQL @dSQL
    SELECT *, Field1Bin=convert(binary(30), Field1) FROM #LocalizationTest
    DROP TABLE #LocalizationTest
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Problem passing a table parameter in rfc call using the function control

    I try to pass a Table as parameter to a Function Module using the SAP.Functions library (part of SAP frontend controls) from a Visual Basic (VBA) program.
    The function module has been verified to work when invoked from SAP FrontEnd Function Builder.
    The SAP RFC Control is created with
    Set sapFunctions=CreateObject("SAP.Functions")
    Following code snippet shows how I attempt to set exports and add a table row before calling the function module:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    <i>'set exports</i>
         .Exports("PA_GLPUPDLEVEL") = "S"
         .Exports("PA_VKORG") = "FI14"
    <i>'append table row</i>
         .Tables("IT_SALES_DATA_UPD").AppendRow
         .Tables("IT_SALES_DATA_UPD")(1, "VKORG") = "FI14"
         .Tables("IT_SALES_DATA_UPD")(1, "MATNR") = "W_3100"
         .Tables("IT_SALES_DATA_UPD")(1, "DATBI") = "99991231"
         .Tables("IT_SALES_DATA_UPD")(1, "DATAB") = "20041231"
         .Tables("IT_SALES_DATA_UPD")(1, "KBETR") = "2222"
         .Tables("IT_SALES_DATA_UPD")(1, "KONWA") = "EUR"
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
        <i>'do something with the return tables here...</i>Else
        Debug.Print sapMaterialUpd.Exception
    End If
    The Call() returns <b>FALSE</b> and the exception is <b>"SYSTEM_FAILURE"</b>. The connection also resets.
    The local logfile that the control generates shows that an exception occurs at the point of the call:
    <i>10.02.2005  17:54:20.766 Packing Parameters for Z_SD_BAPI_SALES_DATA_UPD
    Packing Parameter PA_GLPUPDLEVEL.
    Packing Parameter PA_VKORG.
    Packing Table 0.
    Packing Table 1.
      10.02.2005  17:54:20.766 *** Calling  RFC Function 'Z_SD_BAPI_SALES_DATA_UPD'
      10.02.2005  17:54:20.986 RFC CALL status = RFC_SYS_EXCEPTION
      10.02.2005  17:54:20.986 RFC Error: RFC_IO27
      -Status:CODE=CM_DEALLOCATED_NORMAL STATUS=CM_NO_STATUS_RECEIVED DATA=CM_COMPLETE_DATA_RECEIVED ID=69415076
      -Message:connection closed
      -Internal Status:IO HANDLE=23 DRV=EXT LINE=1420 CODE=27 : GET ID=ffff LINE=861 CODE=7
      10.02.2005  17:54:20.986 Function call finished.</i>
    Seen next code snippet. If the Table object is not touched, the function call goes through without any problems:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    'set exports
        .Exports("PA_GLPUPDLEVEL") = "S"
        .Exports("PA_VKORG") = "FI14"
        'do <b>not</b> append a table row, for testing only ;-)</b>
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
    <i>    'do something with the return tables here...</i>
    Else
        Debug.Print sapMaterialUpd.Exception
    End If
    This code works perfectly when calling the function. It returns TRUE and behaves normally. The function module returns descriptive response text in a table telling that the table was empty, according to the BAPI implementation.
    So is there something special needed here <i>after</i> appending the table row and <i>before</i> making the Call to properly attach the table as a parameter for the function module?
    Can this be a bug in the SAP RFC Control? The version of the wdtfuncs.ocx is 6206.6.45.54.
    Any hints are welcome!

    hi All partner,
    who solved this problem , I meet it too and
    can't clear it.
    SAPfunc := sapfunctions1.Add('z_get_sfcs_dn_mo');    
    SAPitab := sapfunc.tables.item ('I_DNMO');
    SAPitab.appendrow;                                       SAPitab.value(1,'MANDT') := '220'; 
    SAPitab.Value(1,'VBELN') := '2150000001';
    SAPitab.Value(1,'POSNR') := '50';
    SAPitab.value(1,'MATNR') := '19-99999-00'; 
    SAPitab.value(1,'AUFNR') := '921241512001';
    SAPitab.value(1,'DEDAT') := '2005/09/09';
    SAPitab.value(1,'LFIMG') := '100';  
    IF  SAPfunc.call = true then
      begin
      end
    else
        begin
        showmessage('call fail!!') ;
        end;
    end;
    RFC source code as below
    FUNCTION z_get_sfcs_dn_mo.
    ""Local interface:
    *"  TABLES
    *"      I_DNMO STRUCTURE  ZDN_MO
      data: wa type zdn_mo.
      LOOP AT i_dnmo.
        wa-mandt = i_dnmo-mandt.
        wa-vbeln = i_dnmo-vbeln.
        wa-posnr = i_dnmo-posnr.
        wa-matnr = i_dnmo-matnr.
        wa-aufnr = i_dnmo-aufnr.
        wa-dedat = i_dnmo-dedat.
        wa-lfimg = i_dnmo-lfimg.
       modify  zdn_mo from wa.
        insert into zdn_mo values wa.  --dump at here
        commit work.
      ENDLOOP.
    T/C: ST22 error message say at
      insert into zdn_mo values wa. ---dump at here
    the sapfunc.call returns fail.
    Message was edited by: jorry wang

  • Passing the name of a table to a procedure

    Can anyone tell me how you can pass the name of a table to a procedure ?
    I am trying to write a generic procedure that will have the table name and the fieldname passed to it :-
    as in :-
    Select Fieldname FROM Tablename;
    null

    Refere to the documentation of
    built in package dbms_sql.

Maybe you are looking for