I want to assign a value to a rowtype\'s field but I don\'t know how to do it.
Suppose that I have a table X inside my database.
Suppose also that I hav
try this:
CREATE OR REPLACE PROCEDURE ROW_CHANGER(
tRow IN MyTable%ROWTYPE,
col_name IN VARCHAR,
nValue IN NUMBER)
AS
dynamic_request VARCHAR(300);
BEGIN
dynamic_request := 'BEGIN :t_row.'||COL_NAME ||':= :n_value; END;';
EXECUTE IMMEDIATE dynamic_request
USING IN OUT TROW, IN nValue;
END;
this is because in your EXECUTE IMMEDIATE
the tRow MyTable%ROWTYPE
is not defined,
so we defined it with using
statement.