Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Dynamic PL/SQL and Column Name
Hi
I am trying to write Dynamic PL/SQL to update a record depending on a column name:
eg:
DBMS_SQL.PARSE(v_CursorId,
' UPDATE rptwork_cler_prod '||
' SET '||p_ColumnName||' = '||p_ColumnName||' + 1'||
' WHERE userid = '|| p_UserId||
' AND rptrun_id = '|| p_RptRun_Id ,
DBMS_SQL.V7);
The column name is passed in as a variable. Can I do this? It does not seem to like it!
Any help would be appreciated.
Thanks
Matt
Received on Wed Oct 10 2001 - 20:26:10 CDT