Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    3

    Unanswered: Field/Column name as parameter

    Is it possible to pass a field/column name to a stored procedure and then use that parameter in a SET clause? For instance do something like the following (which won't work) but so it works!!

    CREATE OR REPLACE PROCEDURE DBUSER.DBC_QUPD_GENERIC(
    intREF NUMBER
    ,strValue LONG
    ,strField LONG )
    AS

    intCount NUMBER;

    BEGIN

    UPDATE
    DBC_TBL_TABLEA
    SET
    strField = strValue
    WHERE
    REF = REF;

    END;


    Any help much appreciated.


    Karim

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    lookup execute immediate 'sql statement' which allows you to do dynamic sql in the pl/sql manual

Posting Permissions

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