Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Hardcoded columns
Can't be done, but you can simulate it using the dbms_sql package.
Or it can be done by constructing the sql
declare
mysql varchar2(500);
begin
mysql:='update table tname set '||variable||'='''xoxoxo'''
dbms_utility.exec_ddl_statement(mysql);
end;
/
-- Robert Fazio, Oracle DBA rfazio_at_home.com remove nospam from reply address http://24.8.218.197/ "Nick G. Anagnos" <anagnon_at_westat.com> wrote in message news:391C7035.733F46B5_at_westat.com...Received on Sat May 13 2000 - 00:00:00 CDT
> I have a table with different date columns, ex: c2000_02, c2000_03, ...
> I have a program that has the columns hardcoded depending on which
> column to update, ex: update table set c2000_02 = "xoxoxo"
> Instead of hardcoding the column in the update statement, I'd like to
> have the c2000_02 as a variable so the statement would look like:
> update table set variable = "xoxoxo"
>
> Nick
>
![]() |
![]() |