Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL Question

Re: PL/SQL Question

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: 1998/12/01
Message-ID: <7419f7$egv$1@newton.a2000.nl>#1/1

Venkat wrote
>I need to update certain tables, whose names are stored
>in another table, from a stored procedure.

Indeed, like Steve suggested, take a look at dbms_sql. Two examples below. Simply create a varchar2 holding your statement and call execDML, like:

  for r in my_cursor
  loop

      v_RowCount := execDML
          ( 'update ' || r.table_name
          || ' set my_date = sysdate'
          || ' where my_column = ''hello'' '
          );

  end loop;
  commit;

Arjan.

Received on Tue Dec 01 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US