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: Query problem with UPDATE

Re: Query problem with UPDATE

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 7 Dec 2000 22:48:51 +0100
Message-ID: <90p7k1$2059v$2@ID-62141.news.dfncis.de>

set campo1 = (select campo1 + campo2 from tavola2 where )

No PL/SQL necessary

Regards,

Sybrand Bakker, Oracle DBA

"Marco Pinzuti" <mpinzuti_at_virgilio.it> wrote in message news:20001207162201.ZQZG28429.mta1@[212.48.4.51]...
> I've tried to carry out the following query:
>
> UPDATE TAVOLA1
> SET CAMPO1 = CAMPO1 + (SELECT CAMPO2 FROM TAVOLA2 WHERE ...);
>
> Oracle answers by saying MISSING EXPRESSION
>
> I've solved the issue by writing a PL/SQL program where I put the result
> of SELECT CAMPO2 FROM TAVOLA2 WHERE .. into a variable X and then
> by performing:
> UPDATE TAVOLA1
> SET CAMPO1 = CAMPO1 + X;
>
> Does it exists any other way to do so without writing a PL/SQL program?
>
> Thanks in advance
>
> ----------------------------------------------
> Virgilio Mail - Il tuo indirizzo E-mail gratis
> http://mail.virgilio.it
>
>
>
> --
> Posted from [212.48.4.46]
> via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Thu Dec 07 2000 - 15:48:51 CST

Original text of this message

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