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: Fun with a non-trivial update statement

Re: Fun with a non-trivial update statement

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Wed, 28 Apr 1999 21:24:46 -0700
Message-ID: <3727DF0E.18F7@oriolecorp.com>


claggett_at_my-dejanews.com wrote:
> In MS SQL the statement looks somthing like:
>
> UPDATE A
> SET A.Value = A.Value * B.Value;
> FROM mytable A, mytable B
> WHERE A.ID = B.ID - 1
>

More trivial than you think :

 UPDATE mytable A
 SET A.Value = (SELECT A.Value * B.Value

                FROM mytable B
                WHERE A.ID = B.ID - 1)

--
Regards,

  Stéphane Faroult
  Oriole Corporation



http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
Received on Wed Apr 28 1999 - 23:24:46 CDT

Original text of this message

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