Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: hardcoded columns
Nick,
Use dynamic sql. Its native in 8i. If you have a version of Oracle pre 8.1.5, then use the DBMS_SQL package.
Cheers,
Peter N. Crompton
( Oracle Certified Professional )
Web: http://www.pitchmark.demon.co.uk/
Email: Peter_Crompton_at_yahoo.com
Nick G. Anagnos <anagnon_at_westat.com> wrote in message
news:391C6FFE.895B82D0_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 Sun May 14 2000 - 00:00:00 CDT