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

Home -> Community -> Usenet -> c.d.o.server -> Re: Functions in Update

Re: Functions in Update

From: Ron <support_at_dbainfopower.com>
Date: Fri, 13 Feb 2004 22:33:07 -0800
Message-ID: <LJmdnYSLX5g-IrDdRVn-gQ@comcast.com>

Hello newtophp2000,

 You can try: UPDATE mytable SET col2 = func1(col1), col3 = func2(col1, func1(col1) );,

   or since func2 now using cal1 and derivatives of col1 you may modify it to use col1 only and call func1 inside of func2.

Regards,

  Ron
  DBA Infopower
  http://www.dbainfopower.com
  Standard disclaimer:
http://www.dbainfopower.com/dbaip_advice_disclaimer.html

<newtophp2000_at_yahoo.com> wrote in message news:124f428e.0402132209.1afd93a6_at_posting.google.com...
> I have a query that uses a couple of custom-developed functions to
> update two columns. The syntax I am using is as follows. Mytable has
> col1, col2 and col3 and all are type number.
>
> UPDATE mytable SET col2 = func1(col1), col3 = func2(col1, col2);
>
> The thing is that when the query is executed, the col3 values are not
> updated as expected. That is, func2 uses the old values of col2 and
> not the newly computed values. Is there a way to resolve this?
>
> This is on Oracle 9.2 on Windows XP.
Received on Sat Feb 14 2004 - 00:33:07 CST

Original text of this message

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