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: Hardcoded columns

Re: Hardcoded columns

From: Bob Fazio <rfazio_at_home.com.nospam>
Date: 2000/05/13
Message-ID: <Yi3T4.187419$Tn4.1514230@news1.rdc2.pa.home.com>#1/1

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...

> 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
>
Received on Sat May 13 2000 - 00:00:00 CDT

Original text of this message

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